generated-configure.sh revision 2358:f3b2cb07e635
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
690FIXPATH_DETACH_FLAG
691FIXPATH
692BUILD_GTEST
693VALID_JVM_FEATURES
694JVM_FEATURES_custom
695JVM_FEATURES_zeroshark
696JVM_FEATURES_zero
697JVM_FEATURES_minimal
698JVM_FEATURES_core
699JVM_FEATURES_client
700JVM_FEATURES_server
701INCLUDE_DTRACE
702GCOV_ENABLED
703STRIP_POLICY
704DEBUG_BINARIES
705ZIP_EXTERNAL_DEBUG_SYMBOLS
706COPY_DEBUG_SYMBOLS
707COMPILE_WITH_DEBUG_SYMBOLS
708CFLAGS_WARNINGS_ARE_ERRORS
709BUILD_CC_DISABLE_WARNING_PREFIX
710DISABLE_WARNING_PREFIX
711HOTSPOT_SET_WARNINGS_AS_ERRORS
712WARNINGS_AS_ERRORS
713COMPILER_SUPPORTS_TARGET_BITS_FLAG
714ZERO_ARCHFLAG
715LDFLAGS_TESTEXE
716LDFLAGS_TESTLIB
717CXXFLAGS_TESTEXE
718CXXFLAGS_TESTLIB
719CFLAGS_TESTEXE
720CFLAGS_TESTLIB
721OPENJDK_BUILD_JVM_LIBS
722OPENJDK_BUILD_JVM_ASFLAGS
723OPENJDK_BUILD_JVM_LDFLAGS
724OPENJDK_BUILD_JVM_CFLAGS
725OPENJDK_BUILD_LDFLAGS_HASH_STYLE
726OPENJDK_BUILD_LDFLAGS_CXX_JDK
727OPENJDK_BUILD_JDKEXE_LIBS
728OPENJDK_BUILD_JDKLIB_LIBS
729OPENJDK_BUILD_LDFLAGS_JDKEXE
730OPENJDK_BUILD_LDFLAGS_JDKLIB
731OPENJDK_BUILD_CXXFLAGS_JDKEXE
732OPENJDK_BUILD_CXXFLAGS_JDKLIB
733OPENJDK_BUILD_CFLAGS_JDKEXE
734OPENJDK_BUILD_CFLAGS_JDKLIB
735OPENJDK_BUILD_CXXSTD_CXXFLAG
736JVM_LIBS
737JVM_ASFLAGS
738JVM_LDFLAGS
739JVM_CFLAGS
740LDFLAGS_HASH_STYLE
741LDFLAGS_CXX_JDK
742JDKEXE_LIBS
743JDKLIB_LIBS
744LDFLAGS_JDKEXE
745LDFLAGS_JDKLIB
746CXXFLAGS_JDKEXE
747CXXFLAGS_JDKLIB
748CFLAGS_JDKEXE
749CFLAGS_JDKLIB
750MACOSX_VERSION_MIN
751CXXSTD_CXXFLAG
752CXX_O_FLAG_SIZE
753CXX_O_FLAG_NONE
754CXX_O_FLAG_DEBUG
755CXX_O_FLAG_NORM
756CXX_O_FLAG_HI
757CXX_O_FLAG_HIGHEST
758CXX_O_FLAG_HIGHEST_JVM
759C_O_FLAG_SIZE
760C_O_FLAG_NONE
761C_O_FLAG_DEBUG
762C_O_FLAG_NORM
763C_O_FLAG_HI
764C_O_FLAG_HIGHEST
765C_O_FLAG_HIGHEST_JVM
766JVM_CFLAGS_SYMBOLS
767CXXFLAGS_DEBUG_SYMBOLS
768CFLAGS_DEBUG_SYMBOLS
769CXX_FLAG_DEPS
770C_FLAG_DEPS
771SHARED_LIBRARY_FLAGS
772SET_SHARED_LIBRARY_MAPFILE
773SET_SHARED_LIBRARY_NAME
774SET_SHARED_LIBRARY_ORIGIN
775SET_EXECUTABLE_ORIGIN
776CXX_FLAG_REORDER
777C_FLAG_REORDER
778JVM_RCFLAGS
779RC_FLAGS
780AR_OUT_OPTION
781LD_OUT_OPTION
782EXE_OUT_OPTION
783CC_OUT_OPTION
784STRIPFLAGS
785ARFLAGS
786COMPILER_BINDCMD_FILE_FLAG
787COMPILER_COMMAND_FILE_FLAG
788COMPILER_TARGET_BITS_FLAG
789JT_HOME
790JTREGEXE
791HOTSPOT_TOOLCHAIN_TYPE
792USING_BROKEN_SUSE_LD
793PACKAGE_PATH
794BUILD_AS
795BUILD_LDCXX
796BUILD_LD
797BUILD_STRIP
798BUILD_OBJCOPY
799BUILD_AR
800BUILD_NM
801BUILD_CXX
802BUILD_CC
803BUILD_SYSROOT_LDFLAGS
804BUILD_SYSROOT_CFLAGS
805ac_ct_OBJDUMP
806OBJDUMP
807ac_ct_OBJCOPY
808OBJCOPY
809ac_ct_NM
810ac_ct_STRIP
811GNM
812NM
813STRIP
814MSBUILD
815DUMPBIN
816RC
817MT
818LIPO
819ac_ct_AR
820AR
821AS
822LDCXX
823LD
824CXXCPP
825CPP
826CXX_VERSION_NUMBER
827CC_VERSION_NUMBER
828ac_ct_CXX
829CXXFLAGS
830CXX
831TOOLCHAIN_PATH_CXX
832POTENTIAL_CXX
833OBJEXT
834EXEEXT
835ac_ct_CC
836CPPFLAGS
837LDFLAGS
838CFLAGS
839CC
840TOOLCHAIN_PATH_CC
841POTENTIAL_CC
842TOOLCHAIN_VERSION
843VS_LIB
844VS_INCLUDE
845VS_PATH
846CYGWIN_LINK
847SYSROOT_LDFLAGS
848SYSROOT_CFLAGS
849EXTRA_LDFLAGS
850EXTRA_CXXFLAGS
851EXTRA_CFLAGS
852LEGACY_EXTRA_LDFLAGS
853LEGACY_EXTRA_CXXFLAGS
854LEGACY_EXTRA_CFLAGS
855EXE_SUFFIX
856OBJ_SUFFIX
857STATIC_LIBRARY
858SHARED_LIBRARY
859STATIC_LIBRARY_SUFFIX
860SHARED_LIBRARY_SUFFIX
861LIBRARY_PREFIX
862TOOLCHAIN_TYPE
863STATIC_BUILD
864IMPORT_MODULES_MAKE
865IMPORT_MODULES_SRC
866IMPORT_MODULES_CONF
867IMPORT_MODULES_LIBS
868IMPORT_MODULES_CMDS
869IMPORT_MODULES_CLASSES
870BUILD_HOTSPOT
871HOTSPOT_DIST
872BUILD_OUTPUT
873JDK_TOPDIR
874NASHORN_TOPDIR
875HOTSPOT_TOPDIR
876JAXWS_TOPDIR
877JAXP_TOPDIR
878CORBA_TOPDIR
879LANGTOOLS_TOPDIR
880EXTERNAL_BUILDJDK
881BUILD_JDK
882CREATE_BUILDJDK
883JLINK
884JMOD
885BOOT_JDK_BITS
886JAVAC_FLAGS
887BOOT_JDK_MODULAR
888BOOT_JDK_SOURCETARGET
889JARSIGNER
890JAR
891JAVAH
892JAVAC
893JAVA
894BOOT_JDK
895JAVA_CHECK
896JAVAC_CHECK
897VERSION_IS_GA
898VERSION_SHORT
899VERSION_STRING
900VERSION_NUMBER_FOUR_POSITIONS
901VERSION_NUMBER
902VERSION_OPT
903VERSION_BUILD
904VERSION_PRE
905VERSION_PATCH
906VERSION_SECURITY
907VERSION_MINOR
908VERSION_MAJOR
909MACOSX_BUNDLE_ID_BASE
910MACOSX_BUNDLE_NAME_BASE
911HOTSPOT_VM_DISTRO
912COMPANY_NAME
913JDK_RC_PLATFORM_NAME
914PRODUCT_SUFFIX
915PRODUCT_NAME
916LAUNCHER_NAME
917JLINK_KEEP_PACKAGED_MODULES
918COPYRIGHT_YEAR
919COMPRESS_JARS
920INCLUDE_SA
921UNLIMITED_CRYPTO
922CACERTS_FILE
923ENABLE_HEADLESS_ONLY
924DEFAULT_MAKE_TARGET
925OS_VERSION_MICRO
926OS_VERSION_MINOR
927OS_VERSION_MAJOR
928PKG_CONFIG
929BASH_ARGS
930SETFILE
931CODESIGN
932XATTR
933DSYMUTIL
934IS_GNU_TIME
935PATCH
936DTRACE
937TIME
938STAT
939HG
940READELF
941OTOOL
942LDD
943ZIPEXE
944UNZIP
945TAR_SUPPORTS_TRANSFORM
946TAR_INCLUDE_PARAM
947TAR_CREATE_EXTRA_PARAM
948TAR_TYPE
949FIND_DELETE
950OUTPUT_SYNC
951OUTPUT_SYNC_SUPPORTED
952CHECK_TOOLSDIR_MAKE
953CHECK_TOOLSDIR_GMAKE
954CHECK_MAKE
955CHECK_GMAKE
956MAKE
957PKGHANDLER
958CONFIGURESUPPORT_OUTPUTDIR
959OUTPUT_ROOT
960CONF_NAME
961SPEC
962SDKROOT
963XCODEBUILD
964VALID_JVM_VARIANTS
965JVM_VARIANTS
966DEBUG_LEVEL
967HOTSPOT_DEBUG_LEVEL
968JDK_VARIANT
969USERNAME
970CANONICAL_TOPDIR
971ORIGINAL_TOPDIR
972TOPDIR
973PATH_SEP
974ZERO_ARCHDEF
975HOTSPOT_BUILD_CPU_DEFINE
976HOTSPOT_BUILD_CPU_ARCH
977HOTSPOT_BUILD_CPU
978HOTSPOT_BUILD_OS_TYPE
979HOTSPOT_BUILD_OS
980OPENJDK_BUILD_BUNDLE_PLATFORM
981OPENJDK_BUILD_CPU_BUNDLE
982OPENJDK_BUILD_OS_BUNDLE
983OPENJDK_BUILD_OS_EXPORT_DIR
984OPENJDK_BUILD_CPU_JLI_CFLAGS
985OPENJDK_BUILD_CPU_OSARCH
986OPENJDK_BUILD_CPU_ISADIR
987OPENJDK_BUILD_CPU_LIBDIR
988OPENJDK_BUILD_CPU_LEGACY_LIB
989OPENJDK_BUILD_CPU_LEGACY
990HOTSPOT_TARGET_CPU_DEFINE
991HOTSPOT_TARGET_CPU_ARCH
992HOTSPOT_TARGET_CPU
993HOTSPOT_TARGET_OS_TYPE
994HOTSPOT_TARGET_OS
995DEFINE_CROSS_COMPILE_ARCH
996LP64
997OPENJDK_TARGET_BUNDLE_PLATFORM
998OPENJDK_TARGET_CPU_BUNDLE
999OPENJDK_TARGET_OS_BUNDLE
1000OPENJDK_TARGET_OS_EXPORT_DIR
1001OPENJDK_TARGET_CPU_JLI_CFLAGS
1002OPENJDK_TARGET_CPU_OSARCH
1003OPENJDK_TARGET_CPU_ISADIR
1004OPENJDK_TARGET_CPU_LIBDIR
1005OPENJDK_TARGET_CPU_LEGACY_LIB
1006OPENJDK_TARGET_CPU_LEGACY
1007REQUIRED_OS_VERSION
1008REQUIRED_OS_NAME
1009COMPILE_TYPE
1010OPENJDK_TARGET_CPU_ENDIAN
1011OPENJDK_TARGET_CPU_BITS
1012OPENJDK_TARGET_CPU_ARCH
1013OPENJDK_TARGET_CPU
1014OPENJDK_TARGET_OS_ENV
1015OPENJDK_TARGET_OS_TYPE
1016OPENJDK_TARGET_OS
1017OPENJDK_BUILD_CPU_ENDIAN
1018OPENJDK_BUILD_CPU_BITS
1019OPENJDK_BUILD_CPU_ARCH
1020OPENJDK_BUILD_CPU
1021OPENJDK_BUILD_OS_ENV
1022OPENJDK_BUILD_OS_TYPE
1023OPENJDK_BUILD_OS
1024OPENJDK_BUILD_AUTOCONF_NAME
1025OPENJDK_TARGET_AUTOCONF_NAME
1026target_os
1027target_vendor
1028target_cpu
1029target
1030host_os
1031host_vendor
1032host_cpu
1033host
1034build_os
1035build_vendor
1036build_cpu
1037build
1038NICE
1039CPIO
1040DF
1041READLINK
1042CYGPATH
1043SED
1044FGREP
1045EGREP
1046GREP
1047AWK
1048XARGS
1049WHICH
1050WC
1051UNIQ
1052UNAME
1053TR
1054TOUCH
1055TEE
1056TAR
1057TAIL
1058SORT
1059SH
1060RMDIR
1061RM
1062PRINTF
1063NAWK
1064MV
1065MKTEMP
1066MKDIR
1067LS
1068LN
1069GZIP
1070GUNZIP
1071HEAD
1072FIND
1073FILE
1074EXPR
1075ECHO
1076DIRNAME
1077DIFF
1078DATE
1079CUT
1080CP
1081COMM
1082CMP
1083CHMOD
1084CAT
1085BASH
1086BASENAME
1087DATE_WHEN_CONFIGURED
1088ORIGINAL_PATH
1089CONFIGURE_COMMAND_LINE
1090target_alias
1091host_alias
1092build_alias
1093LIBS
1094ECHO_T
1095ECHO_N
1096ECHO_C
1097DEFS
1098mandir
1099localedir
1100libdir
1101psdir
1102pdfdir
1103dvidir
1104htmldir
1105infodir
1106docdir
1107oldincludedir
1108includedir
1109localstatedir
1110sharedstatedir
1111sysconfdir
1112datadir
1113datarootdir
1114libexecdir
1115sbindir
1116bindir
1117program_transform_name
1118prefix
1119exec_prefix
1120PACKAGE_URL
1121PACKAGE_BUGREPORT
1122PACKAGE_STRING
1123PACKAGE_VERSION
1124PACKAGE_TARNAME
1125PACKAGE_NAME
1126PATH_SEPARATOR
1127SHELL'
1128ac_subst_files=''
1129ac_user_opts='
1130enable_option_checking
1131with_target_bits
1132enable_openjdk_only
1133with_custom_make_dir
1134with_jdk_variant
1135enable_debug
1136with_debug_level
1137with_jvm_variants
1138with_devkit
1139with_sys_root
1140with_sysroot
1141with_tools_dir
1142with_toolchain_path
1143with_extra_path
1144with_sdk_name
1145with_conf_name
1146with_output_sync
1147with_default_make_target
1148enable_headless_only
1149with_cacerts_file
1150enable_unlimited_crypto
1151with_copyright_year
1152enable_keep_packaged_modules
1153with_milestone
1154with_update_version
1155with_user_release_suffix
1156with_build_number
1157with_version_string
1158with_version_pre
1159with_version_opt
1160with_version_build
1161with_version_major
1162with_version_minor
1163with_version_security
1164with_version_patch
1165with_boot_jdk
1166with_build_jdk
1167with_add_source_root
1168with_override_source_root
1169with_adds_and_overrides
1170with_override_langtools
1171with_override_corba
1172with_override_jaxp
1173with_override_jaxws
1174with_override_hotspot
1175with_override_nashorn
1176with_override_jdk
1177with_import_hotspot
1178with_import_modules
1179enable_static_build
1180with_toolchain_type
1181with_extra_cflags
1182with_extra_cxxflags
1183with_extra_ldflags
1184with_toolchain_version
1185with_build_devkit
1186with_jtreg
1187enable_warnings_as_errors
1188with_native_debug_symbols
1189enable_debug_symbols
1190enable_zip_debug_info
1191enable_native_coverage
1192enable_dtrace
1193with_jvm_features
1194with_jvm_interpreter
1195enable_hotspot_gtest
1196with_stdc__lib
1197with_msvcr_dll
1198with_msvcp_dll
1199with_x
1200with_cups
1201with_cups_include
1202with_freetype
1203with_freetype_include
1204with_freetype_lib
1205with_freetype_src
1206enable_freetype_bundling
1207with_alsa
1208with_alsa_include
1209with_alsa_lib
1210with_libffi
1211with_libffi_include
1212with_libffi_lib
1213with_libjpeg
1214with_giflib
1215with_libpng
1216with_zlib
1217with_lcms
1218with_dxsdk
1219with_dxsdk_lib
1220with_dxsdk_include
1221enable_jtreg_failure_handler
1222enable_generate_classlist
1223with_num_cores
1224with_memory_size
1225with_jobs
1226with_test_jobs
1227with_boot_jdk_jvmargs
1228with_sjavac_server_java
1229enable_sjavac
1230enable_javac_server
1231enable_icecc
1232enable_precompiled_headers
1233enable_ccache
1234with_ccache_dir
1235'
1236      ac_precious_vars='build_alias
1237host_alias
1238target_alias
1239BASENAME
1240BASH
1241CAT
1242CHMOD
1243CMP
1244COMM
1245CP
1246CUT
1247DATE
1248DIFF
1249DIRNAME
1250ECHO
1251EXPR
1252FILE
1253FIND
1254HEAD
1255GUNZIP
1256GZIP
1257LN
1258LS
1259MKDIR
1260MKTEMP
1261MV
1262NAWK
1263PRINTF
1264RM
1265RMDIR
1266SH
1267SORT
1268TAIL
1269TAR
1270TEE
1271TOUCH
1272TR
1273UNAME
1274UNIQ
1275WC
1276WHICH
1277XARGS
1278AWK
1279GREP
1280EGREP
1281FGREP
1282SED
1283CYGPATH
1284READLINK
1285DF
1286CPIO
1287NICE
1288MAKE
1289UNZIP
1290ZIPEXE
1291LDD
1292OTOOL
1293READELF
1294HG
1295STAT
1296TIME
1297DTRACE
1298PATCH
1299DSYMUTIL
1300XATTR
1301CODESIGN
1302SETFILE
1303PKG_CONFIG
1304JAVA
1305JAVAC
1306JAVAH
1307JAR
1308JARSIGNER
1309CC
1310CFLAGS
1311LDFLAGS
1312LIBS
1313CPPFLAGS
1314CXX
1315CXXFLAGS
1316CCC
1317CPP
1318CXXCPP
1319AS
1320AR
1321LIPO
1322STRIP
1323NM
1324GNM
1325OBJCOPY
1326OBJDUMP
1327BUILD_CC
1328BUILD_CXX
1329BUILD_NM
1330BUILD_AR
1331BUILD_OBJCOPY
1332BUILD_STRIP
1333JTREGEXE
1334XMKMF
1335FREETYPE_CFLAGS
1336FREETYPE_LIBS
1337ALSA_CFLAGS
1338ALSA_LIBS
1339LIBFFI_CFLAGS
1340LIBFFI_LIBS
1341PNG_CFLAGS
1342PNG_LIBS
1343LCMS_CFLAGS
1344LCMS_LIBS
1345ICECC_CMD
1346ICECC_CREATE_ENV
1347ICECC_WRAPPER
1348CCACHE'
1349
1350
1351# Initialize some variables set by options.
1352ac_init_help=
1353ac_init_version=false
1354ac_unrecognized_opts=
1355ac_unrecognized_sep=
1356# The variables have the same names as the options, with
1357# dashes changed to underlines.
1358cache_file=/dev/null
1359exec_prefix=NONE
1360no_create=
1361no_recursion=
1362prefix=NONE
1363program_prefix=NONE
1364program_suffix=NONE
1365program_transform_name=s,x,x,
1366silent=
1367site=
1368srcdir=
1369verbose=
1370x_includes=NONE
1371x_libraries=NONE
1372
1373# Installation directory options.
1374# These are left unexpanded so users can "make install exec_prefix=/foo"
1375# and all the variables that are supposed to be based on exec_prefix
1376# by default will actually change.
1377# Use braces instead of parens because sh, perl, etc. also accept them.
1378# (The list follows the same order as the GNU Coding Standards.)
1379bindir='${exec_prefix}/bin'
1380sbindir='${exec_prefix}/sbin'
1381libexecdir='${exec_prefix}/libexec'
1382datarootdir='${prefix}/share'
1383datadir='${datarootdir}'
1384sysconfdir='${prefix}/etc'
1385sharedstatedir='${prefix}/com'
1386localstatedir='${prefix}/var'
1387includedir='${prefix}/include'
1388oldincludedir='/usr/include'
1389docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1390infodir='${datarootdir}/info'
1391htmldir='${docdir}'
1392dvidir='${docdir}'
1393pdfdir='${docdir}'
1394psdir='${docdir}'
1395libdir='${exec_prefix}/lib'
1396localedir='${datarootdir}/locale'
1397mandir='${datarootdir}/man'
1398
1399ac_prev=
1400ac_dashdash=
1401for ac_option
1402do
1403  # If the previous option needs an argument, assign it.
1404  if test -n "$ac_prev"; then
1405    eval $ac_prev=\$ac_option
1406    ac_prev=
1407    continue
1408  fi
1409
1410  case $ac_option in
1411  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1412  *=)   ac_optarg= ;;
1413  *)    ac_optarg=yes ;;
1414  esac
1415
1416  # Accept the important Cygnus configure options, so we can diagnose typos.
1417
1418  case $ac_dashdash$ac_option in
1419  --)
1420    ac_dashdash=yes ;;
1421
1422  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1423    ac_prev=bindir ;;
1424  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1425    bindir=$ac_optarg ;;
1426
1427  -build | --build | --buil | --bui | --bu)
1428    ac_prev=build_alias ;;
1429  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1430    build_alias=$ac_optarg ;;
1431
1432  -cache-file | --cache-file | --cache-fil | --cache-fi \
1433  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1434    ac_prev=cache_file ;;
1435  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1436  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1437    cache_file=$ac_optarg ;;
1438
1439  --config-cache | -C)
1440    cache_file=config.cache ;;
1441
1442  -datadir | --datadir | --datadi | --datad)
1443    ac_prev=datadir ;;
1444  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1445    datadir=$ac_optarg ;;
1446
1447  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1448  | --dataroo | --dataro | --datar)
1449    ac_prev=datarootdir ;;
1450  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1451  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1452    datarootdir=$ac_optarg ;;
1453
1454  -disable-* | --disable-*)
1455    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1456    # Reject names that are not valid shell variable names.
1457    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1458      as_fn_error $? "invalid feature name: $ac_useropt"
1459    ac_useropt_orig=$ac_useropt
1460    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1461    case $ac_user_opts in
1462      *"
1463"enable_$ac_useropt"
1464"*) ;;
1465      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1466	 ac_unrecognized_sep=', ';;
1467    esac
1468    eval enable_$ac_useropt=no ;;
1469
1470  -docdir | --docdir | --docdi | --doc | --do)
1471    ac_prev=docdir ;;
1472  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1473    docdir=$ac_optarg ;;
1474
1475  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1476    ac_prev=dvidir ;;
1477  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1478    dvidir=$ac_optarg ;;
1479
1480  -enable-* | --enable-*)
1481    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1482    # Reject names that are not valid shell variable names.
1483    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1484      as_fn_error $? "invalid feature name: $ac_useropt"
1485    ac_useropt_orig=$ac_useropt
1486    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1487    case $ac_user_opts in
1488      *"
1489"enable_$ac_useropt"
1490"*) ;;
1491      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1492	 ac_unrecognized_sep=', ';;
1493    esac
1494    eval enable_$ac_useropt=\$ac_optarg ;;
1495
1496  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1497  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1498  | --exec | --exe | --ex)
1499    ac_prev=exec_prefix ;;
1500  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1501  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1502  | --exec=* | --exe=* | --ex=*)
1503    exec_prefix=$ac_optarg ;;
1504
1505  -gas | --gas | --ga | --g)
1506    # Obsolete; use --with-gas.
1507    with_gas=yes ;;
1508
1509  -help | --help | --hel | --he | -h)
1510    ac_init_help=long ;;
1511  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1512    ac_init_help=recursive ;;
1513  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1514    ac_init_help=short ;;
1515
1516  -host | --host | --hos | --ho)
1517    ac_prev=host_alias ;;
1518  -host=* | --host=* | --hos=* | --ho=*)
1519    host_alias=$ac_optarg ;;
1520
1521  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1522    ac_prev=htmldir ;;
1523  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1524  | --ht=*)
1525    htmldir=$ac_optarg ;;
1526
1527  -includedir | --includedir | --includedi | --included | --include \
1528  | --includ | --inclu | --incl | --inc)
1529    ac_prev=includedir ;;
1530  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1531  | --includ=* | --inclu=* | --incl=* | --inc=*)
1532    includedir=$ac_optarg ;;
1533
1534  -infodir | --infodir | --infodi | --infod | --info | --inf)
1535    ac_prev=infodir ;;
1536  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1537    infodir=$ac_optarg ;;
1538
1539  -libdir | --libdir | --libdi | --libd)
1540    ac_prev=libdir ;;
1541  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1542    libdir=$ac_optarg ;;
1543
1544  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1545  | --libexe | --libex | --libe)
1546    ac_prev=libexecdir ;;
1547  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1548  | --libexe=* | --libex=* | --libe=*)
1549    libexecdir=$ac_optarg ;;
1550
1551  -localedir | --localedir | --localedi | --localed | --locale)
1552    ac_prev=localedir ;;
1553  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1554    localedir=$ac_optarg ;;
1555
1556  -localstatedir | --localstatedir | --localstatedi | --localstated \
1557  | --localstate | --localstat | --localsta | --localst | --locals)
1558    ac_prev=localstatedir ;;
1559  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1560  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1561    localstatedir=$ac_optarg ;;
1562
1563  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1564    ac_prev=mandir ;;
1565  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1566    mandir=$ac_optarg ;;
1567
1568  -nfp | --nfp | --nf)
1569    # Obsolete; use --without-fp.
1570    with_fp=no ;;
1571
1572  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1573  | --no-cr | --no-c | -n)
1574    no_create=yes ;;
1575
1576  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1577  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1578    no_recursion=yes ;;
1579
1580  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1581  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1582  | --oldin | --oldi | --old | --ol | --o)
1583    ac_prev=oldincludedir ;;
1584  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1585  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1586  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1587    oldincludedir=$ac_optarg ;;
1588
1589  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1590    ac_prev=prefix ;;
1591  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1592    prefix=$ac_optarg ;;
1593
1594  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1595  | --program-pre | --program-pr | --program-p)
1596    ac_prev=program_prefix ;;
1597  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1598  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1599    program_prefix=$ac_optarg ;;
1600
1601  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1602  | --program-suf | --program-su | --program-s)
1603    ac_prev=program_suffix ;;
1604  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1605  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1606    program_suffix=$ac_optarg ;;
1607
1608  -program-transform-name | --program-transform-name \
1609  | --program-transform-nam | --program-transform-na \
1610  | --program-transform-n | --program-transform- \
1611  | --program-transform | --program-transfor \
1612  | --program-transfo | --program-transf \
1613  | --program-trans | --program-tran \
1614  | --progr-tra | --program-tr | --program-t)
1615    ac_prev=program_transform_name ;;
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    program_transform_name=$ac_optarg ;;
1624
1625  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1626    ac_prev=pdfdir ;;
1627  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1628    pdfdir=$ac_optarg ;;
1629
1630  -psdir | --psdir | --psdi | --psd | --ps)
1631    ac_prev=psdir ;;
1632  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1633    psdir=$ac_optarg ;;
1634
1635  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1636  | -silent | --silent | --silen | --sile | --sil)
1637    silent=yes ;;
1638
1639  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1640    ac_prev=sbindir ;;
1641  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1642  | --sbi=* | --sb=*)
1643    sbindir=$ac_optarg ;;
1644
1645  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1646  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1647  | --sharedst | --shareds | --shared | --share | --shar \
1648  | --sha | --sh)
1649    ac_prev=sharedstatedir ;;
1650  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1651  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1652  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1653  | --sha=* | --sh=*)
1654    sharedstatedir=$ac_optarg ;;
1655
1656  -site | --site | --sit)
1657    ac_prev=site ;;
1658  -site=* | --site=* | --sit=*)
1659    site=$ac_optarg ;;
1660
1661  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1662    ac_prev=srcdir ;;
1663  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1664    srcdir=$ac_optarg ;;
1665
1666  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1667  | --syscon | --sysco | --sysc | --sys | --sy)
1668    ac_prev=sysconfdir ;;
1669  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1670  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1671    sysconfdir=$ac_optarg ;;
1672
1673  -target | --target | --targe | --targ | --tar | --ta | --t)
1674    ac_prev=target_alias ;;
1675  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1676    target_alias=$ac_optarg ;;
1677
1678  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1679    verbose=yes ;;
1680
1681  -version | --version | --versio | --versi | --vers | -V)
1682    ac_init_version=: ;;
1683
1684  -with-* | --with-*)
1685    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1686    # Reject names that are not valid shell variable names.
1687    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1688      as_fn_error $? "invalid package name: $ac_useropt"
1689    ac_useropt_orig=$ac_useropt
1690    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1691    case $ac_user_opts in
1692      *"
1693"with_$ac_useropt"
1694"*) ;;
1695      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1696	 ac_unrecognized_sep=', ';;
1697    esac
1698    eval with_$ac_useropt=\$ac_optarg ;;
1699
1700  -without-* | --without-*)
1701    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1702    # Reject names that are not valid shell variable names.
1703    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1704      as_fn_error $? "invalid package name: $ac_useropt"
1705    ac_useropt_orig=$ac_useropt
1706    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1707    case $ac_user_opts in
1708      *"
1709"with_$ac_useropt"
1710"*) ;;
1711      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1712	 ac_unrecognized_sep=', ';;
1713    esac
1714    eval with_$ac_useropt=no ;;
1715
1716  --x)
1717    # Obsolete; use --with-x.
1718    with_x=yes ;;
1719
1720  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1721  | --x-incl | --x-inc | --x-in | --x-i)
1722    ac_prev=x_includes ;;
1723  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1724  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1725    x_includes=$ac_optarg ;;
1726
1727  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1728  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1729    ac_prev=x_libraries ;;
1730  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1731  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1732    x_libraries=$ac_optarg ;;
1733
1734  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1735Try \`$0 --help' for more information"
1736    ;;
1737
1738  *=*)
1739    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1740    # Reject names that are not valid shell variable names.
1741    case $ac_envvar in #(
1742      '' | [0-9]* | *[!_$as_cr_alnum]* )
1743      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1744    esac
1745    eval $ac_envvar=\$ac_optarg
1746    export $ac_envvar ;;
1747
1748  *)
1749    # FIXME: should be removed in autoconf 3.0.
1750    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1751    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1752      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1753    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1754    ;;
1755
1756  esac
1757done
1758
1759if test -n "$ac_prev"; then
1760  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1761  as_fn_error $? "missing argument to $ac_option"
1762fi
1763
1764if test -n "$ac_unrecognized_opts"; then
1765  case $enable_option_checking in
1766    no) ;;
1767    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1768    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1769  esac
1770fi
1771
1772# Check all directory arguments for consistency.
1773for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1774		datadir sysconfdir sharedstatedir localstatedir includedir \
1775		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1776		libdir localedir mandir
1777do
1778  eval ac_val=\$$ac_var
1779  # Remove trailing slashes.
1780  case $ac_val in
1781    */ )
1782      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1783      eval $ac_var=\$ac_val;;
1784  esac
1785  # Be sure to have absolute directory names.
1786  case $ac_val in
1787    [\\/$]* | ?:[\\/]* )  continue;;
1788    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1789  esac
1790  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1791done
1792
1793# There might be people who depend on the old broken behavior: `$host'
1794# used to hold the argument of --host etc.
1795# FIXME: To remove some day.
1796build=$build_alias
1797host=$host_alias
1798target=$target_alias
1799
1800# FIXME: To remove some day.
1801if test "x$host_alias" != x; then
1802  if test "x$build_alias" = x; then
1803    cross_compiling=maybe
1804  elif test "x$build_alias" != "x$host_alias"; then
1805    cross_compiling=yes
1806  fi
1807fi
1808
1809ac_tool_prefix=
1810test -n "$host_alias" && ac_tool_prefix=$host_alias-
1811
1812test "$silent" = yes && exec 6>/dev/null
1813
1814
1815ac_pwd=`pwd` && test -n "$ac_pwd" &&
1816ac_ls_di=`ls -di .` &&
1817ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1818  as_fn_error $? "working directory cannot be determined"
1819test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1820  as_fn_error $? "pwd does not report name of working directory"
1821
1822
1823# Find the source files, if location was not specified.
1824if test -z "$srcdir"; then
1825  ac_srcdir_defaulted=yes
1826  # Try the directory containing this script, then the parent directory.
1827  ac_confdir=`$as_dirname -- "$as_myself" ||
1828$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1829	 X"$as_myself" : 'X\(//\)[^/]' \| \
1830	 X"$as_myself" : 'X\(//\)$' \| \
1831	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1832$as_echo X"$as_myself" |
1833    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1834	    s//\1/
1835	    q
1836	  }
1837	  /^X\(\/\/\)[^/].*/{
1838	    s//\1/
1839	    q
1840	  }
1841	  /^X\(\/\/\)$/{
1842	    s//\1/
1843	    q
1844	  }
1845	  /^X\(\/\).*/{
1846	    s//\1/
1847	    q
1848	  }
1849	  s/.*/./; q'`
1850  srcdir=$ac_confdir
1851  if test ! -r "$srcdir/$ac_unique_file"; then
1852    srcdir=..
1853  fi
1854else
1855  ac_srcdir_defaulted=no
1856fi
1857if test ! -r "$srcdir/$ac_unique_file"; then
1858  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1859  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1860fi
1861ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1862ac_abs_confdir=`(
1863	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1864	pwd)`
1865# When building in place, set srcdir=.
1866if test "$ac_abs_confdir" = "$ac_pwd"; then
1867  srcdir=.
1868fi
1869# Remove unnecessary trailing slashes from srcdir.
1870# Double slashes in file names in object file debugging info
1871# mess up M-x gdb in Emacs.
1872case $srcdir in
1873*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1874esac
1875for ac_var in $ac_precious_vars; do
1876  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1877  eval ac_env_${ac_var}_value=\$${ac_var}
1878  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1879  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1880done
1881
1882#
1883# Report the --help message.
1884#
1885if test "$ac_init_help" = "long"; then
1886  # Omit some internal or obsolete options to make the list less imposing.
1887  # This message is too long to be a string in the A/UX 3.1 sh.
1888  cat <<_ACEOF
1889\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1890
1891Usage: $0 [OPTION]... [VAR=VALUE]...
1892
1893To assign environment variables (e.g., CC, CFLAGS...), specify them as
1894VAR=VALUE.  See below for descriptions of some of the useful variables.
1895
1896Defaults for the options are specified in brackets.
1897
1898Configuration:
1899  -h, --help              display this help and exit
1900      --help=short        display options specific to this package
1901      --help=recursive    display the short help of all the included packages
1902  -V, --version           display version information and exit
1903  -q, --quiet, --silent   do not print \`checking ...' messages
1904      --cache-file=FILE   cache test results in FILE [disabled]
1905  -C, --config-cache      alias for \`--cache-file=config.cache'
1906  -n, --no-create         do not create output files
1907      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1908
1909Installation directories:
1910  --prefix=PREFIX         install architecture-independent files in PREFIX
1911                          [$ac_default_prefix]
1912  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1913                          [PREFIX]
1914
1915By default, \`make install' will install all the files in
1916\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1917an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1918for instance \`--prefix=\$HOME'.
1919
1920For better control, use the options below.
1921
1922Fine tuning of the installation directories:
1923  --bindir=DIR            user executables [EPREFIX/bin]
1924  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1925  --libexecdir=DIR        program executables [EPREFIX/libexec]
1926  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1927  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1928  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1929  --libdir=DIR            object code libraries [EPREFIX/lib]
1930  --includedir=DIR        C header files [PREFIX/include]
1931  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1932  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1933  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1934  --infodir=DIR           info documentation [DATAROOTDIR/info]
1935  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1936  --mandir=DIR            man documentation [DATAROOTDIR/man]
1937  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1938  --htmldir=DIR           html documentation [DOCDIR]
1939  --dvidir=DIR            dvi documentation [DOCDIR]
1940  --pdfdir=DIR            pdf documentation [DOCDIR]
1941  --psdir=DIR             ps documentation [DOCDIR]
1942_ACEOF
1943
1944  cat <<\_ACEOF
1945
1946X features:
1947  --x-includes=DIR    X include files are in DIR
1948  --x-libraries=DIR   X library files are in DIR
1949
1950System types:
1951  --build=BUILD     configure for building on BUILD [guessed]
1952  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1953  --target=TARGET   configure for building compilers for TARGET [HOST]
1954_ACEOF
1955fi
1956
1957if test -n "$ac_init_help"; then
1958  case $ac_init_help in
1959     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1960   esac
1961  cat <<\_ACEOF
1962
1963Optional Features:
1964  --disable-option-checking  ignore unrecognized --enable/--with options
1965  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1966  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1967  --enable-openjdk-only   suppress building custom source even if present
1968                          [disabled]
1969  --enable-debug          set the debug level to fastdebug (shorthand for
1970                          --with-debug-level=fastdebug) [disabled]
1971  --enable-headless-only  only build headless (no GUI) support [disabled]
1972  --enable-unlimited-crypto
1973                          Enable unlimited crypto policy [disabled]
1974  --disable-keep-packaged-modules
1975                          Do not keep packaged modules in jdk image [enable]
1976  --enable-static-build   enable static library build [disabled]
1977  --disable-warnings-as-errors
1978                          do not consider native warnings to be an error
1979                          [enabled]
1980  --enable-debug-symbols  Deprecated. Option is kept for backwards
1981                          compatibility and is ignored
1982  --enable-zip-debug-info Deprecated. Option is kept for backwards
1983                          compatibility and is ignored
1984  --enable-native-coverage
1985                          enable native compilation with code coverage
1986                          data[disabled]
1987  --enable-dtrace[=yes/no/auto]
1988                          enable dtrace. Default is auto, where dtrace is
1989                          enabled if all dependencies are present.
1990  --disable-hotspot-gtest Disables building of the Hotspot unit tests
1991  --disable-freetype-bundling
1992                          disable bundling of the freetype library with the
1993                          build result [enabled on Windows or when using
1994                          --with-freetype, disabled otherwise]
1995  --enable-jtreg-failure-handler
1996                          forces build of the jtreg failure handler to be
1997                          enabled, missing dependencies become fatal errors.
1998                          Default is auto, where the failure handler is built
1999                          if all dependencies are present and otherwise just
2000                          disabled.
2001  --disable-generate-classlist
2002                          forces enabling or disabling of the generation of a
2003                          CDS classlist at build time. Default is to generate
2004                          it when either the server or client JVMs are built.
2005  --enable-sjavac         use sjavac to do fast incremental compiles
2006                          [disabled]
2007  --disable-javac-server  disable javac server [enabled]
2008  --enable-icecc          enable distribted compilation of native code using
2009                          icecc/icecream [disabled]
2010  --disable-precompiled-headers
2011                          disable using precompiled headers when compiling C++
2012                          [enabled]
2013  --enable-ccache         enable using ccache to speed up recompilations
2014                          [disabled]
2015
2016Optional Packages:
2017  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2018  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2019  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2020                          support it), e.g. --with-target-bits=32 [guessed]
2021  --with-custom-make-dir  Deprecated. Option is kept for backwards
2022                          compatibility and is ignored
2023  --with-jdk-variant      JDK variant to build (normal) [normal]
2024  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2025                          optimized) [release]
2026  --with-jvm-variants     JVM variants (separated by commas) to build
2027                          (server,client,minimal,core,zero,zeroshark,custom)
2028                          [server]
2029  --with-devkit           use this devkit for compilers, tools and resources
2030  --with-sys-root         alias for --with-sysroot for backwards compatability
2031  --with-sysroot          use this directory as sysroot
2032  --with-tools-dir        alias for --with-toolchain-path for backwards
2033                          compatibility
2034  --with-toolchain-path   prepend these directories when searching for
2035                          toolchain binaries (compilers etc)
2036  --with-extra-path       prepend these directories to the default path
2037  --with-sdk-name         use the platform SDK of the given name. [macosx]
2038  --with-conf-name        use this as the name of the configuration [generated
2039                          from important configuration options]
2040  --with-output-sync      set make output sync type if supported by make.
2041                          [recurse]
2042  --with-default-make-target
2043                          set the default make target [exploded-image]
2044  --with-cacerts-file     specify alternative cacerts file
2045  --with-copyright-year   Set copyright year value for build [current year]
2046  --with-milestone        Deprecated. Option is kept for backwards
2047                          compatibility and is ignored
2048  --with-update-version   Deprecated. Option is kept for backwards
2049                          compatibility and is ignored
2050  --with-user-release-suffix
2051                          Deprecated. Option is kept for backwards
2052                          compatibility and is ignored
2053  --with-build-number     Deprecated. Option is kept for backwards
2054                          compatibility and is ignored
2055  --with-version-string   Set version string [calculated]
2056  --with-version-pre      Set the base part of the version 'PRE' field
2057                          (pre-release identifier) ['internal']
2058  --with-version-opt      Set version 'OPT' field (build metadata)
2059                          [<timestamp>.<user>.<dirname>]
2060  --with-version-build    Set version 'BUILD' field (build number) [not
2061                          specified]
2062  --with-version-major    Set version 'MAJOR' field (first number) [current
2063                          source value]
2064  --with-version-minor    Set version 'MINOR' field (second number) [current
2065                          source value]
2066  --with-version-security Set version 'SECURITY' field (third number) [current
2067                          source value]
2068  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2069                          specified]
2070  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2071  --with-build-jdk        path to JDK of same version as is being built[the
2072                          newly built JDK]
2073  --with-add-source-root  Deprecated. Option is kept for backwards
2074                          compatibility and is ignored
2075  --with-override-source-root
2076                          Deprecated. Option is kept for backwards
2077                          compatibility and is ignored
2078  --with-adds-and-overrides
2079                          Deprecated. Option is kept for backwards
2080                          compatibility and is ignored
2081  --with-override-langtools
2082                          Deprecated. Option is kept for backwards
2083                          compatibility and is ignored
2084  --with-override-corba   Deprecated. Option is kept for backwards
2085                          compatibility and is ignored
2086  --with-override-jaxp    Deprecated. Option is kept for backwards
2087                          compatibility and is ignored
2088  --with-override-jaxws   Deprecated. Option is kept for backwards
2089                          compatibility and is ignored
2090  --with-override-hotspot Deprecated. Option is kept for backwards
2091                          compatibility and is ignored
2092  --with-override-nashorn Deprecated. Option is kept for backwards
2093                          compatibility and is ignored
2094  --with-override-jdk     Deprecated. Option is kept for backwards
2095                          compatibility and is ignored
2096  --with-import-hotspot   import hotspot binaries from this jdk image or
2097                          hotspot build dist dir instead of building from
2098                          source
2099  --with-import-modules   import a set of prebuilt modules either as a zip
2100                          file or an exploded directory
2101  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2102                          to show possible values [platform dependent]
2103  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2104  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2105  --with-extra-ldflags    extra flags to be used when linking jdk
2106  --with-toolchain-version
2107                          the version of the toolchain to look for, use
2108                          '--help' to show possible values [platform
2109                          dependent]
2110  --with-build-devkit     Devkit to use for the build platform toolchain
2111  --with-jtreg            Regression Test Harness [probed]
2112  --with-native-debug-symbols
2113                          set the native debug symbol configuration (none,
2114                          internal, external, zipped) [varying]
2115  --with-jvm-features     additional JVM features to enable (separated by
2116                          comma), use '--help' to show possible values [none]
2117  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2118                          compatibility and is ignored
2119  --with-stdc++lib=<static>,<dynamic>,<default>
2120                          force linking of the C++ runtime on Linux to either
2121                          static or dynamic, default is static with dynamic as
2122                          fallback
2123  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2124                          (Windows only) [probed]
2125  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2126                          (Windows only) [probed]
2127  --with-x                use the X Window System
2128  --with-cups             specify prefix directory for the cups package
2129                          (expecting the headers under PATH/include)
2130  --with-cups-include     specify directory for the cups include files
2131  --with-freetype         specify prefix directory for the freetype package
2132                          (expecting the libraries under PATH/lib and the
2133                          headers under PATH/include)
2134  --with-freetype-include specify directory for the freetype include files
2135  --with-freetype-lib     specify directory for the freetype library
2136  --with-freetype-src     specify directory with freetype sources to
2137                          automatically build the library (experimental,
2138                          Windows-only)
2139  --with-alsa             specify prefix directory for the alsa package
2140                          (expecting the libraries under PATH/lib and the
2141                          headers under PATH/include)
2142  --with-alsa-include     specify directory for the alsa include files
2143  --with-alsa-lib         specify directory for the alsa library
2144  --with-libffi           specify prefix directory for the libffi package
2145                          (expecting the libraries under PATH/lib and the
2146                          headers under PATH/include)
2147  --with-libffi-include   specify directory for the libffi include files
2148  --with-libffi-lib       specify directory for the libffi library
2149  --with-libjpeg          use libjpeg from build system or OpenJDK source
2150                          (system, bundled) [bundled]
2151  --with-giflib           use giflib from build system or OpenJDK source
2152                          (system, bundled) [bundled]
2153  --with-libpng           use libpng from build system or OpenJDK source
2154                          (system, bundled) [bundled]
2155  --with-zlib             use zlib from build system or OpenJDK source
2156                          (system, bundled) [bundled]
2157  --with-lcms             use lcms2 from build system or OpenJDK source
2158                          (system, bundled) [bundled]
2159  --with-dxsdk            Deprecated. Option is kept for backwards
2160                          compatibility and is ignored
2161  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2162                          compatibility and is ignored
2163  --with-dxsdk-include    Deprecated. Option is kept for backwards
2164                          compatibility and is ignored
2165  --with-num-cores        number of cores in the build system, e.g.
2166                          --with-num-cores=8 [probed]
2167  --with-memory-size      memory (in MB) available in the build system, e.g.
2168                          --with-memory-size=1024 [probed]
2169  --with-jobs             number of parallel jobs to let make run [calculated
2170                          based on cores and memory]
2171  --with-test-jobs        number of parallel tests jobs to run [based on build
2172                          jobs]
2173  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2174                          invocations of boot JDK, overriding the default
2175                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2176                          -enableassertions"
2177  --with-sjavac-server-java
2178                          use this java binary for running the sjavac
2179                          background server [Boot JDK java]
2180  --with-ccache-dir       where to store ccache files [~/.ccache]
2181
2182Some influential environment variables:
2183  BASENAME    Override default value for BASENAME
2184  BASH        Override default value for BASH
2185  CAT         Override default value for CAT
2186  CHMOD       Override default value for CHMOD
2187  CMP         Override default value for CMP
2188  COMM        Override default value for COMM
2189  CP          Override default value for CP
2190  CUT         Override default value for CUT
2191  DATE        Override default value for DATE
2192  DIFF        Override default value for DIFF
2193  DIRNAME     Override default value for DIRNAME
2194  ECHO        Override default value for ECHO
2195  EXPR        Override default value for EXPR
2196  FILE        Override default value for FILE
2197  FIND        Override default value for FIND
2198  HEAD        Override default value for HEAD
2199  GUNZIP      Override default value for GUNZIP
2200  GZIP        Override default value for GZIP
2201  LN          Override default value for LN
2202  LS          Override default value for LS
2203  MKDIR       Override default value for MKDIR
2204  MKTEMP      Override default value for MKTEMP
2205  MV          Override default value for MV
2206  NAWK        Override default value for NAWK
2207  PRINTF      Override default value for PRINTF
2208  RM          Override default value for RM
2209  RMDIR       Override default value for RMDIR
2210  SH          Override default value for SH
2211  SORT        Override default value for SORT
2212  TAIL        Override default value for TAIL
2213  TAR         Override default value for TAR
2214  TEE         Override default value for TEE
2215  TOUCH       Override default value for TOUCH
2216  TR          Override default value for TR
2217  UNAME       Override default value for UNAME
2218  UNIQ        Override default value for UNIQ
2219  WC          Override default value for WC
2220  WHICH       Override default value for WHICH
2221  XARGS       Override default value for XARGS
2222  AWK         Override default value for AWK
2223  GREP        Override default value for GREP
2224  EGREP       Override default value for EGREP
2225  FGREP       Override default value for FGREP
2226  SED         Override default value for SED
2227  CYGPATH     Override default value for CYGPATH
2228  READLINK    Override default value for READLINK
2229  DF          Override default value for DF
2230  CPIO        Override default value for CPIO
2231  NICE        Override default value for NICE
2232  MAKE        Override default value for MAKE
2233  UNZIP       Override default value for UNZIP
2234  ZIPEXE      Override default value for ZIPEXE
2235  LDD         Override default value for LDD
2236  OTOOL       Override default value for OTOOL
2237  READELF     Override default value for READELF
2238  HG          Override default value for HG
2239  STAT        Override default value for STAT
2240  TIME        Override default value for TIME
2241  DTRACE      Override default value for DTRACE
2242  PATCH       Override default value for PATCH
2243  DSYMUTIL    Override default value for DSYMUTIL
2244  XATTR       Override default value for XATTR
2245  CODESIGN    Override default value for CODESIGN
2246  SETFILE     Override default value for SETFILE
2247  PKG_CONFIG  path to pkg-config utility
2248  JAVA        Override default value for JAVA
2249  JAVAC       Override default value for JAVAC
2250  JAVAH       Override default value for JAVAH
2251  JAR         Override default value for JAR
2252  JARSIGNER   Override default value for JARSIGNER
2253  CC          C compiler command
2254  CFLAGS      C compiler flags
2255  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2256              nonstandard directory <lib dir>
2257  LIBS        libraries to pass to the linker, e.g. -l<library>
2258  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2259              you have headers in a nonstandard directory <include dir>
2260  CXX         C++ compiler command
2261  CXXFLAGS    C++ compiler flags
2262  CPP         C preprocessor
2263  CXXCPP      C++ preprocessor
2264  AS          Override default value for AS
2265  AR          Override default value for AR
2266  LIPO        Override default value for LIPO
2267  STRIP       Override default value for STRIP
2268  NM          Override default value for NM
2269  GNM         Override default value for GNM
2270  OBJCOPY     Override default value for OBJCOPY
2271  OBJDUMP     Override default value for OBJDUMP
2272  BUILD_CC    Override default value for BUILD_CC
2273  BUILD_CXX   Override default value for BUILD_CXX
2274  BUILD_NM    Override default value for BUILD_NM
2275  BUILD_AR    Override default value for BUILD_AR
2276  BUILD_OBJCOPY
2277              Override default value for BUILD_OBJCOPY
2278  BUILD_STRIP Override default value for BUILD_STRIP
2279  JTREGEXE    Override default value for JTREGEXE
2280  XMKMF       Path to xmkmf, Makefile generator for X Window System
2281  FREETYPE_CFLAGS
2282              C compiler flags for FREETYPE, overriding pkg-config
2283  FREETYPE_LIBS
2284              linker flags for FREETYPE, overriding pkg-config
2285  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2286  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2287  LIBFFI_CFLAGS
2288              C compiler flags for LIBFFI, overriding pkg-config
2289  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2290  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2291  PNG_LIBS    linker flags for PNG, overriding pkg-config
2292  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2293  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2294  ICECC_CMD   Override default value for ICECC_CMD
2295  ICECC_CREATE_ENV
2296              Override default value for ICECC_CREATE_ENV
2297  ICECC_WRAPPER
2298              Override default value for ICECC_WRAPPER
2299  CCACHE      Override default value for CCACHE
2300
2301Use these variables to override the choices made by `configure' or to help
2302it to find libraries and programs with nonstandard names/locations.
2303
2304Report bugs to <build-dev@openjdk.java.net>.
2305OpenJDK home page: <http://openjdk.java.net>.
2306_ACEOF
2307ac_status=$?
2308fi
2309
2310if test "$ac_init_help" = "recursive"; then
2311  # If there are subdirs, report their specific --help.
2312  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2313    test -d "$ac_dir" ||
2314      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2315      continue
2316    ac_builddir=.
2317
2318case "$ac_dir" in
2319.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2320*)
2321  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2322  # A ".." for each directory in $ac_dir_suffix.
2323  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2324  case $ac_top_builddir_sub in
2325  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2326  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2327  esac ;;
2328esac
2329ac_abs_top_builddir=$ac_pwd
2330ac_abs_builddir=$ac_pwd$ac_dir_suffix
2331# for backward compatibility:
2332ac_top_builddir=$ac_top_build_prefix
2333
2334case $srcdir in
2335  .)  # We are building in place.
2336    ac_srcdir=.
2337    ac_top_srcdir=$ac_top_builddir_sub
2338    ac_abs_top_srcdir=$ac_pwd ;;
2339  [\\/]* | ?:[\\/]* )  # Absolute name.
2340    ac_srcdir=$srcdir$ac_dir_suffix;
2341    ac_top_srcdir=$srcdir
2342    ac_abs_top_srcdir=$srcdir ;;
2343  *) # Relative name.
2344    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2345    ac_top_srcdir=$ac_top_build_prefix$srcdir
2346    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2347esac
2348ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2349
2350    cd "$ac_dir" || { ac_status=$?; continue; }
2351    # Check for guested configure.
2352    if test -f "$ac_srcdir/configure.gnu"; then
2353      echo &&
2354      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2355    elif test -f "$ac_srcdir/configure"; then
2356      echo &&
2357      $SHELL "$ac_srcdir/configure" --help=recursive
2358    else
2359      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2360    fi || ac_status=$?
2361    cd "$ac_pwd" || { ac_status=$?; break; }
2362  done
2363fi
2364
2365test -n "$ac_init_help" && exit $ac_status
2366if $ac_init_version; then
2367  cat <<\_ACEOF
2368OpenJDK configure jdk9
2369generated by GNU Autoconf 2.69
2370
2371Copyright (C) 2012 Free Software Foundation, Inc.
2372This configure script is free software; the Free Software Foundation
2373gives unlimited permission to copy, distribute and modify it.
2374_ACEOF
2375  exit
2376fi
2377
2378## ------------------------ ##
2379## Autoconf initialization. ##
2380## ------------------------ ##
2381
2382# ac_fn_c_try_compile LINENO
2383# --------------------------
2384# Try to compile conftest.$ac_ext, and return whether this succeeded.
2385ac_fn_c_try_compile ()
2386{
2387  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2388  rm -f conftest.$ac_objext
2389  if { { ac_try="$ac_compile"
2390case "(($ac_try" in
2391  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2392  *) ac_try_echo=$ac_try;;
2393esac
2394eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2395$as_echo "$ac_try_echo"; } >&5
2396  (eval "$ac_compile") 2>conftest.err
2397  ac_status=$?
2398  if test -s conftest.err; then
2399    grep -v '^ *+' conftest.err >conftest.er1
2400    cat conftest.er1 >&5
2401    mv -f conftest.er1 conftest.err
2402  fi
2403  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2404  test $ac_status = 0; } && {
2405	 test -z "$ac_c_werror_flag" ||
2406	 test ! -s conftest.err
2407       } && test -s conftest.$ac_objext; then :
2408  ac_retval=0
2409else
2410  $as_echo "$as_me: failed program was:" >&5
2411sed 's/^/| /' conftest.$ac_ext >&5
2412
2413	ac_retval=1
2414fi
2415  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2416  as_fn_set_status $ac_retval
2417
2418} # ac_fn_c_try_compile
2419
2420# ac_fn_cxx_try_compile LINENO
2421# ----------------------------
2422# Try to compile conftest.$ac_ext, and return whether this succeeded.
2423ac_fn_cxx_try_compile ()
2424{
2425  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2426  rm -f conftest.$ac_objext
2427  if { { ac_try="$ac_compile"
2428case "(($ac_try" in
2429  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2430  *) ac_try_echo=$ac_try;;
2431esac
2432eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2433$as_echo "$ac_try_echo"; } >&5
2434  (eval "$ac_compile") 2>conftest.err
2435  ac_status=$?
2436  if test -s conftest.err; then
2437    grep -v '^ *+' conftest.err >conftest.er1
2438    cat conftest.er1 >&5
2439    mv -f conftest.er1 conftest.err
2440  fi
2441  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2442  test $ac_status = 0; } && {
2443	 test -z "$ac_cxx_werror_flag" ||
2444	 test ! -s conftest.err
2445       } && test -s conftest.$ac_objext; then :
2446  ac_retval=0
2447else
2448  $as_echo "$as_me: failed program was:" >&5
2449sed 's/^/| /' conftest.$ac_ext >&5
2450
2451	ac_retval=1
2452fi
2453  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2454  as_fn_set_status $ac_retval
2455
2456} # ac_fn_cxx_try_compile
2457
2458# ac_fn_c_try_cpp LINENO
2459# ----------------------
2460# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2461ac_fn_c_try_cpp ()
2462{
2463  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2464  if { { ac_try="$ac_cpp conftest.$ac_ext"
2465case "(($ac_try" in
2466  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2467  *) ac_try_echo=$ac_try;;
2468esac
2469eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2470$as_echo "$ac_try_echo"; } >&5
2471  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2472  ac_status=$?
2473  if test -s conftest.err; then
2474    grep -v '^ *+' conftest.err >conftest.er1
2475    cat conftest.er1 >&5
2476    mv -f conftest.er1 conftest.err
2477  fi
2478  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2479  test $ac_status = 0; } > conftest.i && {
2480	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2481	 test ! -s conftest.err
2482       }; then :
2483  ac_retval=0
2484else
2485  $as_echo "$as_me: failed program was:" >&5
2486sed 's/^/| /' conftest.$ac_ext >&5
2487
2488    ac_retval=1
2489fi
2490  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2491  as_fn_set_status $ac_retval
2492
2493} # ac_fn_c_try_cpp
2494
2495# ac_fn_cxx_try_cpp LINENO
2496# ------------------------
2497# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2498ac_fn_cxx_try_cpp ()
2499{
2500  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2501  if { { ac_try="$ac_cpp conftest.$ac_ext"
2502case "(($ac_try" in
2503  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2504  *) ac_try_echo=$ac_try;;
2505esac
2506eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2507$as_echo "$ac_try_echo"; } >&5
2508  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2509  ac_status=$?
2510  if test -s conftest.err; then
2511    grep -v '^ *+' conftest.err >conftest.er1
2512    cat conftest.er1 >&5
2513    mv -f conftest.er1 conftest.err
2514  fi
2515  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2516  test $ac_status = 0; } > conftest.i && {
2517	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2518	 test ! -s conftest.err
2519       }; then :
2520  ac_retval=0
2521else
2522  $as_echo "$as_me: failed program was:" >&5
2523sed 's/^/| /' conftest.$ac_ext >&5
2524
2525    ac_retval=1
2526fi
2527  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2528  as_fn_set_status $ac_retval
2529
2530} # ac_fn_cxx_try_cpp
2531
2532# ac_fn_c_try_link LINENO
2533# -----------------------
2534# Try to link conftest.$ac_ext, and return whether this succeeded.
2535ac_fn_c_try_link ()
2536{
2537  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2538  rm -f conftest.$ac_objext conftest$ac_exeext
2539  if { { ac_try="$ac_link"
2540case "(($ac_try" in
2541  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2542  *) ac_try_echo=$ac_try;;
2543esac
2544eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2545$as_echo "$ac_try_echo"; } >&5
2546  (eval "$ac_link") 2>conftest.err
2547  ac_status=$?
2548  if test -s conftest.err; then
2549    grep -v '^ *+' conftest.err >conftest.er1
2550    cat conftest.er1 >&5
2551    mv -f conftest.er1 conftest.err
2552  fi
2553  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2554  test $ac_status = 0; } && {
2555	 test -z "$ac_c_werror_flag" ||
2556	 test ! -s conftest.err
2557       } && test -s conftest$ac_exeext && {
2558	 test "$cross_compiling" = yes ||
2559	 test -x conftest$ac_exeext
2560       }; then :
2561  ac_retval=0
2562else
2563  $as_echo "$as_me: failed program was:" >&5
2564sed 's/^/| /' conftest.$ac_ext >&5
2565
2566	ac_retval=1
2567fi
2568  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2569  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2570  # interfere with the next link command; also delete a directory that is
2571  # left behind by Apple's compiler.  We do this before executing the actions.
2572  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2573  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2574  as_fn_set_status $ac_retval
2575
2576} # ac_fn_c_try_link
2577
2578# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2579# ---------------------------------------------------------
2580# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2581# the include files in INCLUDES and setting the cache variable VAR
2582# accordingly.
2583ac_fn_cxx_check_header_mongrel ()
2584{
2585  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2586  if eval \${$3+:} false; then :
2587  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2588$as_echo_n "checking for $2... " >&6; }
2589if eval \${$3+:} false; then :
2590  $as_echo_n "(cached) " >&6
2591fi
2592eval ac_res=\$$3
2593	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2594$as_echo "$ac_res" >&6; }
2595else
2596  # Is the header compilable?
2597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2598$as_echo_n "checking $2 usability... " >&6; }
2599cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2600/* end confdefs.h.  */
2601$4
2602#include <$2>
2603_ACEOF
2604if ac_fn_cxx_try_compile "$LINENO"; then :
2605  ac_header_compiler=yes
2606else
2607  ac_header_compiler=no
2608fi
2609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2611$as_echo "$ac_header_compiler" >&6; }
2612
2613# Is the header present?
2614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2615$as_echo_n "checking $2 presence... " >&6; }
2616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2617/* end confdefs.h.  */
2618#include <$2>
2619_ACEOF
2620if ac_fn_cxx_try_cpp "$LINENO"; then :
2621  ac_header_preproc=yes
2622else
2623  ac_header_preproc=no
2624fi
2625rm -f conftest.err conftest.i conftest.$ac_ext
2626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2627$as_echo "$ac_header_preproc" >&6; }
2628
2629# So?  What about this header?
2630case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2631  yes:no: )
2632    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2633$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2634    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2635$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2636    ;;
2637  no:yes:* )
2638    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2639$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2640    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2641$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2642    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2643$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2644    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2645$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2646    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2647$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2648( $as_echo "## ----------------------------------------- ##
2649## Report this to build-dev@openjdk.java.net ##
2650## ----------------------------------------- ##"
2651     ) | sed "s/^/$as_me: WARNING:     /" >&2
2652    ;;
2653esac
2654  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2655$as_echo_n "checking for $2... " >&6; }
2656if eval \${$3+:} false; then :
2657  $as_echo_n "(cached) " >&6
2658else
2659  eval "$3=\$ac_header_compiler"
2660fi
2661eval ac_res=\$$3
2662	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2663$as_echo "$ac_res" >&6; }
2664fi
2665  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2666
2667} # ac_fn_cxx_check_header_mongrel
2668
2669# ac_fn_cxx_try_run LINENO
2670# ------------------------
2671# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2672# that executables *can* be run.
2673ac_fn_cxx_try_run ()
2674{
2675  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2676  if { { ac_try="$ac_link"
2677case "(($ac_try" in
2678  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2679  *) ac_try_echo=$ac_try;;
2680esac
2681eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2682$as_echo "$ac_try_echo"; } >&5
2683  (eval "$ac_link") 2>&5
2684  ac_status=$?
2685  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2686  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2687  { { case "(($ac_try" in
2688  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2689  *) ac_try_echo=$ac_try;;
2690esac
2691eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2692$as_echo "$ac_try_echo"; } >&5
2693  (eval "$ac_try") 2>&5
2694  ac_status=$?
2695  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2696  test $ac_status = 0; }; }; then :
2697  ac_retval=0
2698else
2699  $as_echo "$as_me: program exited with status $ac_status" >&5
2700       $as_echo "$as_me: failed program was:" >&5
2701sed 's/^/| /' conftest.$ac_ext >&5
2702
2703       ac_retval=$ac_status
2704fi
2705  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2706  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2707  as_fn_set_status $ac_retval
2708
2709} # ac_fn_cxx_try_run
2710
2711# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2712# ---------------------------------------------------------
2713# Tests whether HEADER exists and can be compiled using the include files in
2714# INCLUDES, setting the cache variable VAR accordingly.
2715ac_fn_cxx_check_header_compile ()
2716{
2717  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2718  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2719$as_echo_n "checking for $2... " >&6; }
2720if eval \${$3+:} false; then :
2721  $as_echo_n "(cached) " >&6
2722else
2723  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2724/* end confdefs.h.  */
2725$4
2726#include <$2>
2727_ACEOF
2728if ac_fn_cxx_try_compile "$LINENO"; then :
2729  eval "$3=yes"
2730else
2731  eval "$3=no"
2732fi
2733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2734fi
2735eval ac_res=\$$3
2736	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2737$as_echo "$ac_res" >&6; }
2738  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2739
2740} # ac_fn_cxx_check_header_compile
2741
2742# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2743# ----------------------------------------------
2744# Tries to find the compile-time value of EXPR in a program that includes
2745# INCLUDES, setting VAR accordingly. Returns whether the value could be
2746# computed
2747ac_fn_cxx_compute_int ()
2748{
2749  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2750  if test "$cross_compiling" = yes; then
2751    # Depending upon the size, compute the lo and hi bounds.
2752cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2753/* end confdefs.h.  */
2754$4
2755int
2756main ()
2757{
2758static int test_array [1 - 2 * !(($2) >= 0)];
2759test_array [0] = 0;
2760return test_array [0];
2761
2762  ;
2763  return 0;
2764}
2765_ACEOF
2766if ac_fn_cxx_try_compile "$LINENO"; then :
2767  ac_lo=0 ac_mid=0
2768  while :; do
2769    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2770/* end confdefs.h.  */
2771$4
2772int
2773main ()
2774{
2775static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2776test_array [0] = 0;
2777return test_array [0];
2778
2779  ;
2780  return 0;
2781}
2782_ACEOF
2783if ac_fn_cxx_try_compile "$LINENO"; then :
2784  ac_hi=$ac_mid; break
2785else
2786  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2787			if test $ac_lo -le $ac_mid; then
2788			  ac_lo= ac_hi=
2789			  break
2790			fi
2791			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2792fi
2793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2794  done
2795else
2796  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2797/* end confdefs.h.  */
2798$4
2799int
2800main ()
2801{
2802static int test_array [1 - 2 * !(($2) < 0)];
2803test_array [0] = 0;
2804return test_array [0];
2805
2806  ;
2807  return 0;
2808}
2809_ACEOF
2810if ac_fn_cxx_try_compile "$LINENO"; then :
2811  ac_hi=-1 ac_mid=-1
2812  while :; do
2813    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2814/* end confdefs.h.  */
2815$4
2816int
2817main ()
2818{
2819static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2820test_array [0] = 0;
2821return test_array [0];
2822
2823  ;
2824  return 0;
2825}
2826_ACEOF
2827if ac_fn_cxx_try_compile "$LINENO"; then :
2828  ac_lo=$ac_mid; break
2829else
2830  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2831			if test $ac_mid -le $ac_hi; then
2832			  ac_lo= ac_hi=
2833			  break
2834			fi
2835			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2836fi
2837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2838  done
2839else
2840  ac_lo= ac_hi=
2841fi
2842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2843fi
2844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2845# Binary search between lo and hi bounds.
2846while test "x$ac_lo" != "x$ac_hi"; do
2847  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2848  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2849/* end confdefs.h.  */
2850$4
2851int
2852main ()
2853{
2854static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2855test_array [0] = 0;
2856return test_array [0];
2857
2858  ;
2859  return 0;
2860}
2861_ACEOF
2862if ac_fn_cxx_try_compile "$LINENO"; then :
2863  ac_hi=$ac_mid
2864else
2865  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2866fi
2867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2868done
2869case $ac_lo in #((
2870?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2871'') ac_retval=1 ;;
2872esac
2873  else
2874    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2875/* end confdefs.h.  */
2876$4
2877static long int longval () { return $2; }
2878static unsigned long int ulongval () { return $2; }
2879#include <stdio.h>
2880#include <stdlib.h>
2881int
2882main ()
2883{
2884
2885  FILE *f = fopen ("conftest.val", "w");
2886  if (! f)
2887    return 1;
2888  if (($2) < 0)
2889    {
2890      long int i = longval ();
2891      if (i != ($2))
2892	return 1;
2893      fprintf (f, "%ld", i);
2894    }
2895  else
2896    {
2897      unsigned long int i = ulongval ();
2898      if (i != ($2))
2899	return 1;
2900      fprintf (f, "%lu", i);
2901    }
2902  /* Do not output a trailing newline, as this causes \r\n confusion
2903     on some platforms.  */
2904  return ferror (f) || fclose (f) != 0;
2905
2906  ;
2907  return 0;
2908}
2909_ACEOF
2910if ac_fn_cxx_try_run "$LINENO"; then :
2911  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2912else
2913  ac_retval=1
2914fi
2915rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2916  conftest.$ac_objext conftest.beam conftest.$ac_ext
2917rm -f conftest.val
2918
2919  fi
2920  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2921  as_fn_set_status $ac_retval
2922
2923} # ac_fn_cxx_compute_int
2924
2925# ac_fn_cxx_try_link LINENO
2926# -------------------------
2927# Try to link conftest.$ac_ext, and return whether this succeeded.
2928ac_fn_cxx_try_link ()
2929{
2930  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2931  rm -f conftest.$ac_objext conftest$ac_exeext
2932  if { { ac_try="$ac_link"
2933case "(($ac_try" in
2934  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2935  *) ac_try_echo=$ac_try;;
2936esac
2937eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2938$as_echo "$ac_try_echo"; } >&5
2939  (eval "$ac_link") 2>conftest.err
2940  ac_status=$?
2941  if test -s conftest.err; then
2942    grep -v '^ *+' conftest.err >conftest.er1
2943    cat conftest.er1 >&5
2944    mv -f conftest.er1 conftest.err
2945  fi
2946  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2947  test $ac_status = 0; } && {
2948	 test -z "$ac_cxx_werror_flag" ||
2949	 test ! -s conftest.err
2950       } && test -s conftest$ac_exeext && {
2951	 test "$cross_compiling" = yes ||
2952	 test -x conftest$ac_exeext
2953       }; then :
2954  ac_retval=0
2955else
2956  $as_echo "$as_me: failed program was:" >&5
2957sed 's/^/| /' conftest.$ac_ext >&5
2958
2959	ac_retval=1
2960fi
2961  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2962  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2963  # interfere with the next link command; also delete a directory that is
2964  # left behind by Apple's compiler.  We do this before executing the actions.
2965  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2966  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2967  as_fn_set_status $ac_retval
2968
2969} # ac_fn_cxx_try_link
2970
2971# ac_fn_cxx_check_func LINENO FUNC VAR
2972# ------------------------------------
2973# Tests whether FUNC exists, setting the cache variable VAR accordingly
2974ac_fn_cxx_check_func ()
2975{
2976  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2977  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2978$as_echo_n "checking for $2... " >&6; }
2979if eval \${$3+:} false; then :
2980  $as_echo_n "(cached) " >&6
2981else
2982  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2983/* end confdefs.h.  */
2984/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2985   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2986#define $2 innocuous_$2
2987
2988/* System header to define __stub macros and hopefully few prototypes,
2989    which can conflict with char $2 (); below.
2990    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2991    <limits.h> exists even on freestanding compilers.  */
2992
2993#ifdef __STDC__
2994# include <limits.h>
2995#else
2996# include <assert.h>
2997#endif
2998
2999#undef $2
3000
3001/* Override any GCC internal prototype to avoid an error.
3002   Use char because int might match the return type of a GCC
3003   builtin and then its argument prototype would still apply.  */
3004#ifdef __cplusplus
3005extern "C"
3006#endif
3007char $2 ();
3008/* The GNU C library defines this for functions which it implements
3009    to always fail with ENOSYS.  Some functions are actually named
3010    something starting with __ and the normal name is an alias.  */
3011#if defined __stub_$2 || defined __stub___$2
3012choke me
3013#endif
3014
3015int
3016main ()
3017{
3018return $2 ();
3019  ;
3020  return 0;
3021}
3022_ACEOF
3023if ac_fn_cxx_try_link "$LINENO"; then :
3024  eval "$3=yes"
3025else
3026  eval "$3=no"
3027fi
3028rm -f core conftest.err conftest.$ac_objext \
3029    conftest$ac_exeext conftest.$ac_ext
3030fi
3031eval ac_res=\$$3
3032	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3033$as_echo "$ac_res" >&6; }
3034  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3035
3036} # ac_fn_cxx_check_func
3037
3038# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3039# -------------------------------------------------------
3040# Tests whether HEADER exists and can be compiled using the include files in
3041# INCLUDES, setting the cache variable VAR accordingly.
3042ac_fn_c_check_header_compile ()
3043{
3044  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3045  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3046$as_echo_n "checking for $2... " >&6; }
3047if eval \${$3+:} false; then :
3048  $as_echo_n "(cached) " >&6
3049else
3050  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3051/* end confdefs.h.  */
3052$4
3053#include <$2>
3054_ACEOF
3055if ac_fn_c_try_compile "$LINENO"; then :
3056  eval "$3=yes"
3057else
3058  eval "$3=no"
3059fi
3060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3061fi
3062eval ac_res=\$$3
3063	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3064$as_echo "$ac_res" >&6; }
3065  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3066
3067} # ac_fn_c_check_header_compile
3068cat >config.log <<_ACEOF
3069This file contains any messages produced by compilers while
3070running configure, to aid debugging if configure makes a mistake.
3071
3072It was created by OpenJDK $as_me jdk9, which was
3073generated by GNU Autoconf 2.69.  Invocation command line was
3074
3075  $ $0 $@
3076
3077_ACEOF
3078exec 5>>config.log
3079{
3080cat <<_ASUNAME
3081## --------- ##
3082## Platform. ##
3083## --------- ##
3084
3085hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3086uname -m = `(uname -m) 2>/dev/null || echo unknown`
3087uname -r = `(uname -r) 2>/dev/null || echo unknown`
3088uname -s = `(uname -s) 2>/dev/null || echo unknown`
3089uname -v = `(uname -v) 2>/dev/null || echo unknown`
3090
3091/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3092/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3093
3094/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3095/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3096/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3097/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3098/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3099/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3100/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3101
3102_ASUNAME
3103
3104as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3105for as_dir in $PATH
3106do
3107  IFS=$as_save_IFS
3108  test -z "$as_dir" && as_dir=.
3109    $as_echo "PATH: $as_dir"
3110  done
3111IFS=$as_save_IFS
3112
3113} >&5
3114
3115cat >&5 <<_ACEOF
3116
3117
3118## ----------- ##
3119## Core tests. ##
3120## ----------- ##
3121
3122_ACEOF
3123
3124
3125# Keep a trace of the command line.
3126# Strip out --no-create and --no-recursion so they do not pile up.
3127# Strip out --silent because we don't want to record it for future runs.
3128# Also quote any args containing shell meta-characters.
3129# Make two passes to allow for proper duplicate-argument suppression.
3130ac_configure_args=
3131ac_configure_args0=
3132ac_configure_args1=
3133ac_must_keep_next=false
3134for ac_pass in 1 2
3135do
3136  for ac_arg
3137  do
3138    case $ac_arg in
3139    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3140    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3141    | -silent | --silent | --silen | --sile | --sil)
3142      continue ;;
3143    *\'*)
3144      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3145    esac
3146    case $ac_pass in
3147    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3148    2)
3149      as_fn_append ac_configure_args1 " '$ac_arg'"
3150      if test $ac_must_keep_next = true; then
3151	ac_must_keep_next=false # Got value, back to normal.
3152      else
3153	case $ac_arg in
3154	  *=* | --config-cache | -C | -disable-* | --disable-* \
3155	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3156	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3157	  | -with-* | --with-* | -without-* | --without-* | --x)
3158	    case "$ac_configure_args0 " in
3159	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3160	    esac
3161	    ;;
3162	  -* ) ac_must_keep_next=true ;;
3163	esac
3164      fi
3165      as_fn_append ac_configure_args " '$ac_arg'"
3166      ;;
3167    esac
3168  done
3169done
3170{ ac_configure_args0=; unset ac_configure_args0;}
3171{ ac_configure_args1=; unset ac_configure_args1;}
3172
3173# When interrupted or exit'd, cleanup temporary files, and complete
3174# config.log.  We remove comments because anyway the quotes in there
3175# would cause problems or look ugly.
3176# WARNING: Use '\'' to represent an apostrophe within the trap.
3177# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3178trap 'exit_status=$?
3179  # Save into config.log some information that might help in debugging.
3180  {
3181    echo
3182
3183    $as_echo "## ---------------- ##
3184## Cache variables. ##
3185## ---------------- ##"
3186    echo
3187    # The following way of writing the cache mishandles newlines in values,
3188(
3189  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3190    eval ac_val=\$$ac_var
3191    case $ac_val in #(
3192    *${as_nl}*)
3193      case $ac_var in #(
3194      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3195$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3196      esac
3197      case $ac_var in #(
3198      _ | IFS | as_nl) ;; #(
3199      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3200      *) { eval $ac_var=; unset $ac_var;} ;;
3201      esac ;;
3202    esac
3203  done
3204  (set) 2>&1 |
3205    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3206    *${as_nl}ac_space=\ *)
3207      sed -n \
3208	"s/'\''/'\''\\\\'\'''\''/g;
3209	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3210      ;; #(
3211    *)
3212      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3213      ;;
3214    esac |
3215    sort
3216)
3217    echo
3218
3219    $as_echo "## ----------------- ##
3220## Output variables. ##
3221## ----------------- ##"
3222    echo
3223    for ac_var in $ac_subst_vars
3224    do
3225      eval ac_val=\$$ac_var
3226      case $ac_val in
3227      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3228      esac
3229      $as_echo "$ac_var='\''$ac_val'\''"
3230    done | sort
3231    echo
3232
3233    if test -n "$ac_subst_files"; then
3234      $as_echo "## ------------------- ##
3235## File substitutions. ##
3236## ------------------- ##"
3237      echo
3238      for ac_var in $ac_subst_files
3239      do
3240	eval ac_val=\$$ac_var
3241	case $ac_val in
3242	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3243	esac
3244	$as_echo "$ac_var='\''$ac_val'\''"
3245      done | sort
3246      echo
3247    fi
3248
3249    if test -s confdefs.h; then
3250      $as_echo "## ----------- ##
3251## confdefs.h. ##
3252## ----------- ##"
3253      echo
3254      cat confdefs.h
3255      echo
3256    fi
3257    test "$ac_signal" != 0 &&
3258      $as_echo "$as_me: caught signal $ac_signal"
3259    $as_echo "$as_me: exit $exit_status"
3260  } >&5
3261  rm -f core *.core core.conftest.* &&
3262    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3263    exit $exit_status
3264' 0
3265for ac_signal in 1 2 13 15; do
3266  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3267done
3268ac_signal=0
3269
3270# confdefs.h avoids OS command line length limits that DEFS can exceed.
3271rm -f -r conftest* confdefs.h
3272
3273$as_echo "/* confdefs.h */" > confdefs.h
3274
3275# Predefined preprocessor variables.
3276
3277cat >>confdefs.h <<_ACEOF
3278#define PACKAGE_NAME "$PACKAGE_NAME"
3279_ACEOF
3280
3281cat >>confdefs.h <<_ACEOF
3282#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3283_ACEOF
3284
3285cat >>confdefs.h <<_ACEOF
3286#define PACKAGE_VERSION "$PACKAGE_VERSION"
3287_ACEOF
3288
3289cat >>confdefs.h <<_ACEOF
3290#define PACKAGE_STRING "$PACKAGE_STRING"
3291_ACEOF
3292
3293cat >>confdefs.h <<_ACEOF
3294#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3295_ACEOF
3296
3297cat >>confdefs.h <<_ACEOF
3298#define PACKAGE_URL "$PACKAGE_URL"
3299_ACEOF
3300
3301
3302# Let the site file select an alternate cache file if it wants to.
3303# Prefer an explicitly selected file to automatically selected ones.
3304ac_site_file1=NONE
3305ac_site_file2=NONE
3306if test -n "$CONFIG_SITE"; then
3307  # We do not want a PATH search for config.site.
3308  case $CONFIG_SITE in #((
3309    -*)  ac_site_file1=./$CONFIG_SITE;;
3310    */*) ac_site_file1=$CONFIG_SITE;;
3311    *)   ac_site_file1=./$CONFIG_SITE;;
3312  esac
3313elif test "x$prefix" != xNONE; then
3314  ac_site_file1=$prefix/share/config.site
3315  ac_site_file2=$prefix/etc/config.site
3316else
3317  ac_site_file1=$ac_default_prefix/share/config.site
3318  ac_site_file2=$ac_default_prefix/etc/config.site
3319fi
3320for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3321do
3322  test "x$ac_site_file" = xNONE && continue
3323  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3324    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3325$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3326    sed 's/^/| /' "$ac_site_file" >&5
3327    . "$ac_site_file" \
3328      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3329$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3330as_fn_error $? "failed to load site script $ac_site_file
3331See \`config.log' for more details" "$LINENO" 5; }
3332  fi
3333done
3334
3335if test -r "$cache_file"; then
3336  # Some versions of bash will fail to source /dev/null (special files
3337  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3338  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3339    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3340$as_echo "$as_me: loading cache $cache_file" >&6;}
3341    case $cache_file in
3342      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3343      *)                      . "./$cache_file";;
3344    esac
3345  fi
3346else
3347  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3348$as_echo "$as_me: creating cache $cache_file" >&6;}
3349  >$cache_file
3350fi
3351
3352# Check that the precious variables saved in the cache have kept the same
3353# value.
3354ac_cache_corrupted=false
3355for ac_var in $ac_precious_vars; do
3356  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3357  eval ac_new_set=\$ac_env_${ac_var}_set
3358  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3359  eval ac_new_val=\$ac_env_${ac_var}_value
3360  case $ac_old_set,$ac_new_set in
3361    set,)
3362      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3363$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3364      ac_cache_corrupted=: ;;
3365    ,set)
3366      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3367$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3368      ac_cache_corrupted=: ;;
3369    ,);;
3370    *)
3371      if test "x$ac_old_val" != "x$ac_new_val"; then
3372	# differences in whitespace do not lead to failure.
3373	ac_old_val_w=`echo x $ac_old_val`
3374	ac_new_val_w=`echo x $ac_new_val`
3375	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3376	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3377$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3378	  ac_cache_corrupted=:
3379	else
3380	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3381$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3382	  eval $ac_var=\$ac_old_val
3383	fi
3384	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3385$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3386	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3387$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3388      fi;;
3389  esac
3390  # Pass precious variables to config.status.
3391  if test "$ac_new_set" = set; then
3392    case $ac_new_val in
3393    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3394    *) ac_arg=$ac_var=$ac_new_val ;;
3395    esac
3396    case " $ac_configure_args " in
3397      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3398      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3399    esac
3400  fi
3401done
3402if $ac_cache_corrupted; then
3403  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3404$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3405  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3406$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3407  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3408fi
3409## -------------------- ##
3410## Main body of script. ##
3411## -------------------- ##
3412
3413ac_ext=c
3414ac_cpp='$CPP $CPPFLAGS'
3415ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3416ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3417ac_compiler_gnu=$ac_cv_c_compiler_gnu
3418
3419
3420
3421ac_aux_dir=
3422for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3423  if test -f "$ac_dir/install-sh"; then
3424    ac_aux_dir=$ac_dir
3425    ac_install_sh="$ac_aux_dir/install-sh -c"
3426    break
3427  elif test -f "$ac_dir/install.sh"; then
3428    ac_aux_dir=$ac_dir
3429    ac_install_sh="$ac_aux_dir/install.sh -c"
3430    break
3431  elif test -f "$ac_dir/shtool"; then
3432    ac_aux_dir=$ac_dir
3433    ac_install_sh="$ac_aux_dir/shtool install -c"
3434    break
3435  fi
3436done
3437if test -z "$ac_aux_dir"; then
3438  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
3439fi
3440
3441# These three variables are undocumented and unsupported,
3442# and are intended to be withdrawn in a future Autoconf release.
3443# They can cause serious problems if a builder's source tree is in a directory
3444# whose full name contains unusual characters.
3445ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3446ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3447ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3448
3449
3450# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3451
3452#
3453# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3454# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3455#
3456# This code is free software; you can redistribute it and/or modify it
3457# under the terms of the GNU General Public License version 2 only, as
3458# published by the Free Software Foundation.  Oracle designates this
3459# particular file as subject to the "Classpath" exception as provided
3460# by Oracle in the LICENSE file that accompanied this code.
3461#
3462# This code is distributed in the hope that it will be useful, but WITHOUT
3463# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3464# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3465# version 2 for more details (a copy is included in the LICENSE file that
3466# accompanied this code).
3467#
3468# You should have received a copy of the GNU General Public License version
3469# 2 along with this work; if not, write to the Free Software Foundation,
3470# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3471#
3472# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3473# or visit www.oracle.com if you need additional information or have any
3474# questions.
3475#
3476
3477#
3478# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3479#
3480# This program is free software; you can redistribute it and/or modify
3481# it under the terms of the GNU General Public License as published by
3482# the Free Software Foundation; either version 2 of the License, or
3483# (at your option) any later version.
3484#
3485# This program is distributed in the hope that it will be useful, but
3486# WITHOUT ANY WARRANTY; without even the implied warranty of
3487# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3488# General Public License for more details.
3489#
3490# You should have received a copy of the GNU General Public License
3491# along with this program; if not, write to the Free Software
3492# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3493#
3494# As a special exception to the GNU General Public License, if you
3495# distribute this file as part of a program that contains a
3496# configuration script generated by Autoconf, you may include it under
3497# the same distribution terms that you use for the rest of that program.
3498
3499# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3500# ----------------------------------
3501# PKG_PROG_PKG_CONFIG
3502
3503# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3504#
3505# Check to see whether a particular set of modules exists.  Similar
3506# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3507#
3508#
3509# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3510# this or PKG_CHECK_MODULES is called, or make sure to call
3511# PKG_CHECK_EXISTS manually
3512# --------------------------------------------------------------
3513
3514
3515
3516# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3517# ---------------------------------------------
3518# _PKG_CONFIG
3519
3520# _PKG_SHORT_ERRORS_SUPPORTED
3521# -----------------------------
3522# _PKG_SHORT_ERRORS_SUPPORTED
3523
3524
3525# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3526# [ACTION-IF-NOT-FOUND])
3527#
3528#
3529# Note that if there is a possibility the first call to
3530# PKG_CHECK_MODULES might not happen, you should be sure to include an
3531# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3532#
3533#
3534# --------------------------------------------------------------
3535# PKG_CHECK_MODULES
3536
3537
3538# Include these first...
3539#
3540# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3541# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3542#
3543# This code is free software; you can redistribute it and/or modify it
3544# under the terms of the GNU General Public License version 2 only, as
3545# published by the Free Software Foundation.  Oracle designates this
3546# particular file as subject to the "Classpath" exception as provided
3547# by Oracle in the LICENSE file that accompanied this code.
3548#
3549# This code is distributed in the hope that it will be useful, but WITHOUT
3550# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3551# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3552# version 2 for more details (a copy is included in the LICENSE file that
3553# accompanied this code).
3554#
3555# You should have received a copy of the GNU General Public License version
3556# 2 along with this work; if not, write to the Free Software Foundation,
3557# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3558#
3559# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3560# or visit www.oracle.com if you need additional information or have any
3561# questions.
3562#
3563
3564# Create a function/macro that takes a series of named arguments. The call is
3565# similar to AC_DEFUN, but the setup of the function looks like this:
3566# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3567# ... do something
3568#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3569# ])
3570# A star (*) in front of a named argument means that it is required and it's
3571# presence will be verified. To pass e.g. the first value as a normal indexed
3572# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3573# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3574# "ARG_FOO".
3575#
3576# The generated function can be called like this:
3577# MYFUNC(FOO: [foo-val],
3578#     BAR: [
3579#         $ECHO hello world
3580#     ])
3581# Note that the argument value must start on the same line as the argument name.
3582#
3583# Argument 1: Name of the function to define
3584# Argument 2: List of legal named arguments, with a * prefix for required arguments
3585# Argument 3: Argument array to treat as named, typically $@
3586# Argument 4: The main function body
3587
3588
3589# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3590# If so, then append $1 to $2 \
3591# Also set JVM_ARG_OK to true/false depending on outcome.
3592
3593
3594# Appends a string to a path variable, only adding the : when needed.
3595
3596
3597# Prepends a string to a path variable, only adding the : when needed.
3598
3599
3600# This will make sure the given variable points to a full and proper
3601# path. This means:
3602# 1) There will be no spaces in the path. On unix platforms,
3603#    spaces in the path will result in an error. On Windows,
3604#    the path will be rewritten using short-style to be space-free.
3605# 2) The path will be absolute, and it will be in unix-style (on
3606#     cygwin).
3607# $1: The name of the variable to fix
3608
3609
3610# This will make sure the given variable points to a executable
3611# with a full and proper path. This means:
3612# 1) There will be no spaces in the path. On unix platforms,
3613#    spaces in the path will result in an error. On Windows,
3614#    the path will be rewritten using short-style to be space-free.
3615# 2) The path will be absolute, and it will be in unix-style (on
3616#     cygwin).
3617# Any arguments given to the executable is preserved.
3618# If the input variable does not have a directory specification, then
3619# it need to be in the PATH.
3620# $1: The name of the variable to fix
3621
3622
3623
3624
3625# Register a --with argument but mark it as deprecated
3626# $1: The name of the with argument to deprecate, not including --with-
3627
3628
3629# Register a --enable argument but mark it as deprecated
3630# $1: The name of the with argument to deprecate, not including --enable-
3631# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3632# $3: Messages to user.
3633
3634
3635
3636
3637# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3638# $1: variable to check
3639
3640
3641# Check that there are no unprocessed overridden variables left.
3642# If so, they are an incorrect argument and we will exit with an error.
3643
3644
3645# Setup a tool for the given variable. If correctly specified by the user,
3646# use that value, otherwise search for the tool using the supplied code snippet.
3647# $1: variable to set
3648# $2: code snippet to call to look for the tool
3649# $3: code snippet to call if variable was used to find tool
3650
3651
3652# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3653# $1: variable to set
3654# $2: executable name (or list of names) to look for
3655# $3: [path]
3656
3657
3658# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3659# $1: variable to set
3660# $2: executable name (or list of names) to look for
3661
3662
3663# Like BASIC_PATH_PROGS but fails if no tool was found.
3664# $1: variable to set
3665# $2: executable name (or list of names) to look for
3666# $3: [path]
3667
3668
3669# Like BASIC_SETUP_TOOL but fails if no tool was found.
3670# $1: variable to set
3671# $2: autoconf macro to call to look for the special tool
3672
3673
3674# Setup the most fundamental tools that relies on not much else to set up,
3675# but is used by much of the early bootstrap code.
3676
3677
3678# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3679
3680
3681# Evaluates platform specific overrides for devkit variables.
3682# $1: Name of variable
3683
3684
3685
3686
3687
3688
3689#%%% Simple tools %%%
3690
3691# Check if we have found a usable version of make
3692# $1: the path to a potential make binary (or empty)
3693# $2: the description on how we found this
3694
3695
3696
3697
3698# Goes looking for a usable version of GNU make.
3699
3700
3701
3702
3703
3704
3705
3706
3707# Check if build directory is on local disk. If not possible to determine,
3708# we prefer to claim it's local.
3709# Argument 1: directory to test
3710# Argument 2: what to do if it is on local disk
3711# Argument 3: what to do otherwise (remote disk or failure)
3712
3713
3714# Check that source files have basic read permissions set. This might
3715# not be the case in cygwin in certain conditions.
3716
3717
3718
3719
3720# Check for support for specific options in bash
3721
3722
3723################################################################################
3724#
3725# Default make target
3726#
3727
3728
3729# Code to run after AC_OUTPUT
3730
3731
3732#
3733# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3734# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3735#
3736# This code is free software; you can redistribute it and/or modify it
3737# under the terms of the GNU General Public License version 2 only, as
3738# published by the Free Software Foundation.  Oracle designates this
3739# particular file as subject to the "Classpath" exception as provided
3740# by Oracle in the LICENSE file that accompanied this code.
3741#
3742# This code is distributed in the hope that it will be useful, but WITHOUT
3743# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3744# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3745# version 2 for more details (a copy is included in the LICENSE file that
3746# accompanied this code).
3747#
3748# You should have received a copy of the GNU General Public License version
3749# 2 along with this work; if not, write to the Free Software Foundation,
3750# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3751#
3752# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3753# or visit www.oracle.com if you need additional information or have any
3754# questions.
3755#
3756
3757
3758
3759
3760
3761# Helper function which possibly converts a path using DOS-style short mode.
3762# If so, the updated path is stored in $new_path.
3763# $1: The path to check
3764
3765
3766# Helper function which possibly converts a path using DOS-style short mode.
3767# If so, the updated path is stored in $new_path.
3768# $1: The path to check
3769
3770
3771# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3772# and could probably be heavily simplified. However, all changes in this
3773# area tend to need lot of testing in different scenarios, and in lack of
3774# proper unit testing, cleaning this up has not been deemed worth the effort
3775# at the moment.
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3786
3787
3788
3789
3790# ... then the rest
3791#
3792# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3793# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3794#
3795# This code is free software; you can redistribute it and/or modify it
3796# under the terms of the GNU General Public License version 2 only, as
3797# published by the Free Software Foundation.  Oracle designates this
3798# particular file as subject to the "Classpath" exception as provided
3799# by Oracle in the LICENSE file that accompanied this code.
3800#
3801# This code is distributed in the hope that it will be useful, but WITHOUT
3802# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3803# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3804# version 2 for more details (a copy is included in the LICENSE file that
3805# accompanied this code).
3806#
3807# You should have received a copy of the GNU General Public License version
3808# 2 along with this work; if not, write to the Free Software Foundation,
3809# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3810#
3811# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3812# or visit www.oracle.com if you need additional information or have any
3813# questions.
3814#
3815
3816########################################################################
3817# This file handles detection of the Boot JDK. The Boot JDK detection
3818# process has been developed as a response to solve a complex real-world
3819# problem. Initially, it was simple, but it has grown as platform after
3820# platform, idiosyncracy after idiosyncracy has been supported.
3821#
3822# The basic idea is this:
3823# 1) You need an acceptable *) JDK to use as a Boot JDK
3824# 2) There are several ways to locate a JDK, that are mostly platform
3825#    dependent **)
3826# 3) You can have multiple JDKs installed
3827# 4) If possible, configure should try to dig out an acceptable JDK
3828#    automatically, without having to resort to command-line options
3829#
3830# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3831#     javac) and not a JRE, etc.
3832#
3833# **) On Windows we typically use a well-known path.
3834#     On MacOSX we typically use the tool java_home.
3835#     On Linux we typically find javac in the $PATH, and then follow a
3836#     chain of symlinks that often ends up in a real JDK.
3837#
3838# This leads to the code where we check in different ways to locate a
3839# JDK, and if one is found, check if it is acceptable. If not, we print
3840# our reasons for rejecting it (useful when debugging non-working
3841# configure situations) and continue checking the next one.
3842########################################################################
3843
3844# Execute the check given as argument, and verify the result
3845# If the Boot JDK was previously found, do nothing
3846# $1 A command line (typically autoconf macro) to execute
3847
3848
3849# Test: Is bootjdk explicitely set by command line arguments?
3850
3851
3852# Test: Is $JAVA_HOME set?
3853
3854
3855# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3856
3857
3858# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3859# $1: Argument to the java_home binary (optional)
3860
3861
3862# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3863
3864
3865# Look for a jdk in the given path. If there are multiple, try to select the newest.
3866# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3867# $1 = Path to directory containing jdk installations.
3868# $2 = String to append to the found JDK directory to get the proper JDK home
3869
3870
3871# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3872# environmental variable as base for where to look.
3873# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3874
3875
3876# Test: Is there a JDK installed in default, well-known locations?
3877
3878
3879# Check that a command-line tool in the Boot JDK is correct
3880# $1 = name of variable to assign
3881# $2 = name of binary
3882
3883
3884###############################################################################
3885#
3886# We need a Boot JDK to bootstrap the build.
3887#
3888
3889
3890
3891
3892
3893# BUILD_JDK: the location of the latest JDK that can run
3894#   on the host system and supports the target class file version
3895#   generated in this JDK build.  This variable should only be
3896#   used after the launchers are built.
3897#
3898
3899# Execute the check given as argument, and verify the result.
3900# If the JDK was previously found, do nothing.
3901# $1 A command line (typically autoconf macro) to execute
3902
3903
3904# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3905# is different than the host system doing the build (e.g. cross-compilation),
3906# a special BUILD_JDK is built as part of the build process.  An external
3907# prebuilt BUILD_JDK can also be supplied.
3908
3909
3910#
3911# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3912# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3913#
3914# This code is free software; you can redistribute it and/or modify it
3915# under the terms of the GNU General Public License version 2 only, as
3916# published by the Free Software Foundation.  Oracle designates this
3917# particular file as subject to the "Classpath" exception as provided
3918# by Oracle in the LICENSE file that accompanied this code.
3919#
3920# This code is distributed in the hope that it will be useful, but WITHOUT
3921# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3922# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3923# version 2 for more details (a copy is included in the LICENSE file that
3924# accompanied this code).
3925#
3926# You should have received a copy of the GNU General Public License version
3927# 2 along with this work; if not, write to the Free Software Foundation,
3928# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3929#
3930# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3931# or visit www.oracle.com if you need additional information or have any
3932# questions.
3933#
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951################################################################################
3952#
3953# Runs icecc-create-env once and prints the error if it fails
3954#
3955# $1: arguments to icecc-create-env
3956# $2: log file
3957#
3958
3959
3960################################################################################
3961#
3962# Optionally enable distributed compilation of native code using icecc/icecream
3963#
3964
3965
3966
3967
3968
3969
3970
3971#
3972# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3973# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3974#
3975# This code is free software; you can redistribute it and/or modify it
3976# under the terms of the GNU General Public License version 2 only, as
3977# published by the Free Software Foundation.  Oracle designates this
3978# particular file as subject to the "Classpath" exception as provided
3979# by Oracle in the LICENSE file that accompanied this code.
3980#
3981# This code is distributed in the hope that it will be useful, but WITHOUT
3982# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3983# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3984# version 2 for more details (a copy is included in the LICENSE file that
3985# accompanied this code).
3986#
3987# You should have received a copy of the GNU General Public License version
3988# 2 along with this work; if not, write to the Free Software Foundation,
3989# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3990#
3991# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3992# or visit www.oracle.com if you need additional information or have any
3993# questions.
3994#
3995
3996# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3997# corresponding configure arguments instead
3998
3999
4000# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4001# that configure can use them while detecting compilers.
4002# TOOLCHAIN_TYPE is available here.
4003# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4004
4005
4006
4007
4008
4009
4010# Documentation on common flags used for solstudio in HIGHEST.
4011#
4012# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4013#          done with care, there are some assumptions below that need to
4014#          be understood about the use of pointers, and IEEE behavior.
4015#
4016# -fns: Use non-standard floating point mode (not IEEE 754)
4017# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4018# -fsingle: Use single precision floating point with 'float'
4019# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4020#   (Source with excessing pointer casting and data access with mixed
4021#    pointer types are not recommended)
4022# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4023#   (If you expect perfect errno behavior, do not use this)
4024# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4025# -xrestrict: Pointer parameters to functions do not overlap
4026#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4027#    If you pass in multiple pointers to the same data, do not use this)
4028# -xlibmil: Inline some library routines
4029#   (If you expect perfect errno behavior, do not use this)
4030# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4031#   (If you expect perfect errno behavior, do not use this)
4032#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4033
4034    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4035    # Bug?
4036    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4037    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4038    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4039    #fi
4040
4041
4042
4043
4044
4045
4046################################################################################
4047# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4048#      conditionals against.
4049# $2 - Optional prefix for each variable defined.
4050
4051
4052# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4053#                                  IF_FALSE: [RUN-IF-FALSE])
4054# ------------------------------------------------------------
4055# Check that the C compiler supports an argument
4056
4057
4058
4059
4060# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4061#                                    IF_FALSE: [RUN-IF-FALSE])
4062# ------------------------------------------------------------
4063# Check that the C++ compiler supports an argument
4064
4065
4066
4067
4068# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4069#                                IF_FALSE: [RUN-IF-FALSE])
4070# ------------------------------------------------------------
4071# Check that the C and C++ compilers support an argument
4072
4073
4074
4075
4076# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4077#                                   IF_FALSE: [RUN-IF-FALSE])
4078# ------------------------------------------------------------
4079# Check that the linker support an argument
4080
4081
4082
4083
4084
4085
4086# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4087# Arguments:
4088# $1 - Optional prefix for each variable defined.
4089
4090
4091#
4092# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4093# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4094#
4095# This code is free software; you can redistribute it and/or modify it
4096# under the terms of the GNU General Public License version 2 only, as
4097# published by the Free Software Foundation.  Oracle designates this
4098# particular file as subject to the "Classpath" exception as provided
4099# by Oracle in the LICENSE file that accompanied this code.
4100#
4101# This code is distributed in the hope that it will be useful, but WITHOUT
4102# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4103# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4104# version 2 for more details (a copy is included in the LICENSE file that
4105# accompanied this code).
4106#
4107# You should have received a copy of the GNU General Public License version
4108# 2 along with this work; if not, write to the Free Software Foundation,
4109# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4110#
4111# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4112# or visit www.oracle.com if you need additional information or have any
4113# questions.
4114#
4115
4116
4117
4118
4119
4120cygwin_help() {
4121  case $1 in
4122    unzip)
4123      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4124      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4125      ;;
4126    zip)
4127      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4128      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4129      ;;
4130    make)
4131      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4132      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4133      ;;
4134    freetype)
4135      HELP_MSG="
4136The freetype library can now be build during the configure process.
4137Download the freetype sources and unpack them into an arbitrary directory:
4138
4139wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4140tar -xzf freetype-2.5.3.tar.gz
4141
4142Then run configure with '--with-freetype-src=<freetype_src>'. This will
4143automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4144builds or into '<freetype_src>/lib32' for 32-bit builds.
4145Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4146and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4147
4148Alternatively you can unpack the sources like this to use the default directory:
4149
4150tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4151      ;;
4152  esac
4153}
4154
4155msys_help() {
4156  PKGHANDLER_COMMAND=""
4157}
4158
4159apt_help() {
4160  case $1 in
4161    reduced)
4162      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4163    devkit)
4164      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4165    openjdk)
4166      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4167    alsa)
4168      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4169    cups)
4170      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4171    freetype)
4172      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4173    ffi)
4174      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4175    x11)
4176      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4177    ccache)
4178      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4179    dtrace)
4180      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4181  esac
4182}
4183
4184yum_help() {
4185  case $1 in
4186    devkit)
4187      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4188    openjdk)
4189      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4190    alsa)
4191      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4192    cups)
4193      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4194    freetype)
4195      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4196    x11)
4197      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4198    ccache)
4199      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4200  esac
4201}
4202
4203port_help() {
4204  PKGHANDLER_COMMAND=""
4205}
4206
4207pkgutil_help() {
4208  PKGHANDLER_COMMAND=""
4209}
4210
4211pkgadd_help() {
4212  PKGHANDLER_COMMAND=""
4213}
4214
4215# This function will check if we're called from the "configure" wrapper while
4216# printing --help. If so, we will print out additional information that can
4217# only be extracted within the autoconf script, and then exit. This must be
4218# called at the very beginning in configure.ac.
4219
4220
4221
4222
4223
4224
4225#
4226# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4227# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4228#
4229# This code is free software; you can redistribute it and/or modify it
4230# under the terms of the GNU General Public License version 2 only, as
4231# published by the Free Software Foundation.  Oracle designates this
4232# particular file as subject to the "Classpath" exception as provided
4233# by Oracle in the LICENSE file that accompanied this code.
4234#
4235# This code is distributed in the hope that it will be useful, but WITHOUT
4236# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4237# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4238# version 2 for more details (a copy is included in the LICENSE file that
4239# accompanied this code).
4240#
4241# You should have received a copy of the GNU General Public License version
4242# 2 along with this work; if not, write to the Free Software Foundation,
4243# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4244#
4245# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4246# or visit www.oracle.com if you need additional information or have any
4247# questions.
4248#
4249
4250# All valid JVM features, regardless of platform
4251VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4252    fprof vm-structs jni-check services management all-gcs nmt cds static-build"
4253
4254# All valid JVM variants
4255VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4256
4257###############################################################################
4258# Check if the specified JVM variant should be built. To be used in shell if
4259# constructs, like this:
4260# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4261#
4262# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4263
4264# Definition kept in one line to allow inlining in if statements.
4265# Additional [] needed to keep m4 from mangling shell constructs.
4266
4267
4268###############################################################################
4269# Check if the specified JVM features are explicitly enabled. To be used in
4270# shell if constructs, like this:
4271# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4272#
4273# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4274
4275# Definition kept in one line to allow inlining in if statements.
4276# Additional [] needed to keep m4 from mangling shell constructs.
4277
4278
4279###############################################################################
4280# Check which variants of the JVM that we want to build. Available variants are:
4281#   server: normal interpreter, and a tiered C1/C2 compiler
4282#   client: normal interpreter, and C1 (no C2 compiler)
4283#   minimal: reduced form of client with optional features stripped out
4284#   core: normal interpreter only, no compiler
4285#   zero: C++ based interpreter only, no compiler
4286#   zeroshark: C++ based interpreter, and a llvm-based compiler
4287#   custom: baseline JVM with no default features
4288#
4289
4290
4291###############################################################################
4292# Check if dtrace should be enabled and has all prerequisites present.
4293#
4294
4295
4296###############################################################################
4297# Set up all JVM features for each JVM variant.
4298#
4299
4300
4301###############################################################################
4302# Validate JVM features once all setup is complete, including custom setup.
4303#
4304
4305
4306################################################################################
4307# Check if gtest should be built
4308#
4309
4310
4311#
4312# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4313# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4314#
4315# This code is free software; you can redistribute it and/or modify it
4316# under the terms of the GNU General Public License version 2 only, as
4317# published by the Free Software Foundation.  Oracle designates this
4318# particular file as subject to the "Classpath" exception as provided
4319# by Oracle in the LICENSE file that accompanied this code.
4320#
4321# This code is distributed in the hope that it will be useful, but WITHOUT
4322# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4323# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4324# version 2 for more details (a copy is included in the LICENSE file that
4325# accompanied this code).
4326#
4327# You should have received a copy of the GNU General Public License version
4328# 2 along with this work; if not, write to the Free Software Foundation,
4329# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4330#
4331# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4332# or visit www.oracle.com if you need additional information or have any
4333# questions.
4334#
4335
4336###############################################################################
4337# Check which variant of the JDK that we want to build.
4338# Currently we have:
4339#    normal:   standard edition
4340# but the custom make system may add other variants
4341#
4342# Effectively the JDK variant gives a name to a specific set of
4343# modules to compile into the JDK.
4344
4345
4346###############################################################################
4347# Set the debug level
4348#    release: no debug information, all optimizations, no asserts.
4349#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4350#    fastdebug: debug information (-g), all optimizations, all asserts
4351#    slowdebug: debug information (-g), no optimizations, all asserts
4352
4353
4354###############################################################################
4355#
4356# Should we build only OpenJDK even if closed sources are present?
4357#
4358
4359
4360
4361
4362###############################################################################
4363#
4364# Enable or disable the elliptic curve crypto implementation
4365#
4366
4367
4368
4369
4370################################################################################
4371#
4372# Gcov coverage data for hotspot
4373#
4374
4375
4376################################################################################
4377#
4378# Static build support.  When enabled will generate static
4379# libraries instead of shared libraries for all JDK libs.
4380#
4381
4382
4383################################################################################
4384#
4385# jlink options.
4386# We always keep packaged modules in JDK image.
4387#
4388
4389
4390################################################################################
4391#
4392# Check if building of the jtreg failure handler should be enabled.
4393#
4394
4395
4396################################################################################
4397#
4398# Enable or disable generation of the classlist at build time
4399#
4400
4401
4402#
4403# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4404# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4405#
4406# This code is free software; you can redistribute it and/or modify it
4407# under the terms of the GNU General Public License version 2 only, as
4408# published by the Free Software Foundation.  Oracle designates this
4409# particular file as subject to the "Classpath" exception as provided
4410# by Oracle in the LICENSE file that accompanied this code.
4411#
4412# This code is distributed in the hope that it will be useful, but WITHOUT
4413# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4414# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4415# version 2 for more details (a copy is included in the LICENSE file that
4416# accompanied this code).
4417#
4418# You should have received a copy of the GNU General Public License version
4419# 2 along with this work; if not, write to the Free Software Foundation,
4420# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4421#
4422# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4423# or visit www.oracle.com if you need additional information or have any
4424# questions.
4425#
4426
4427###############################################################################
4428#
4429# Setup version numbers
4430#
4431
4432# Verify that a given string represents a valid version number, and assign it
4433# to a variable.
4434
4435# Argument 1: the variable to assign to
4436# Argument 2: the value given by the user
4437
4438
4439
4440
4441#
4442# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4443# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4444#
4445# This code is free software; you can redistribute it and/or modify it
4446# under the terms of the GNU General Public License version 2 only, as
4447# published by the Free Software Foundation.  Oracle designates this
4448# particular file as subject to the "Classpath" exception as provided
4449# by Oracle in the LICENSE file that accompanied this code.
4450#
4451# This code is distributed in the hope that it will be useful, but WITHOUT
4452# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4453# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4454# version 2 for more details (a copy is included in the LICENSE file that
4455# accompanied this code).
4456#
4457# You should have received a copy of the GNU General Public License version
4458# 2 along with this work; if not, write to the Free Software Foundation,
4459# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4460#
4461# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4462# or visit www.oracle.com if you need additional information or have any
4463# questions.
4464#
4465
4466# Major library component reside in separate files.
4467#
4468# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4469# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4470#
4471# This code is free software; you can redistribute it and/or modify it
4472# under the terms of the GNU General Public License version 2 only, as
4473# published by the Free Software Foundation.  Oracle designates this
4474# particular file as subject to the "Classpath" exception as provided
4475# by Oracle in the LICENSE file that accompanied this code.
4476#
4477# This code is distributed in the hope that it will be useful, but WITHOUT
4478# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4479# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4480# version 2 for more details (a copy is included in the LICENSE file that
4481# accompanied this code).
4482#
4483# You should have received a copy of the GNU General Public License version
4484# 2 along with this work; if not, write to the Free Software Foundation,
4485# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4486#
4487# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4488# or visit www.oracle.com if you need additional information or have any
4489# questions.
4490#
4491
4492################################################################################
4493# Setup alsa (Advanced Linux Sound Architecture)
4494################################################################################
4495
4496
4497#
4498# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4499# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4500#
4501# This code is free software; you can redistribute it and/or modify it
4502# under the terms of the GNU General Public License version 2 only, as
4503# published by the Free Software Foundation.  Oracle designates this
4504# particular file as subject to the "Classpath" exception as provided
4505# by Oracle in the LICENSE file that accompanied this code.
4506#
4507# This code is distributed in the hope that it will be useful, but WITHOUT
4508# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4509# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4510# version 2 for more details (a copy is included in the LICENSE file that
4511# accompanied this code).
4512#
4513# You should have received a copy of the GNU General Public License version
4514# 2 along with this work; if not, write to the Free Software Foundation,
4515# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4516#
4517# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4518# or visit www.oracle.com if you need additional information or have any
4519# questions.
4520#
4521
4522################################################################################
4523# Setup bundled libraries.
4524#
4525# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4526# OpenJDK repository. Default is to use these libraries as bundled, but they
4527# might be replaced by en external version by the user.
4528################################################################################
4529
4530
4531################################################################################
4532# Setup libjpeg
4533################################################################################
4534
4535
4536################################################################################
4537# Setup giflib
4538################################################################################
4539
4540
4541################################################################################
4542# Setup libpng
4543################################################################################
4544
4545
4546################################################################################
4547# Setup zlib
4548################################################################################
4549
4550
4551################################################################################
4552# Setup lcms (Little CMS)
4553################################################################################
4554
4555
4556#
4557# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4558# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4559#
4560# This code is free software; you can redistribute it and/or modify it
4561# under the terms of the GNU General Public License version 2 only, as
4562# published by the Free Software Foundation.  Oracle designates this
4563# particular file as subject to the "Classpath" exception as provided
4564# by Oracle in the LICENSE file that accompanied this code.
4565#
4566# This code is distributed in the hope that it will be useful, but WITHOUT
4567# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4568# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4569# version 2 for more details (a copy is included in the LICENSE file that
4570# accompanied this code).
4571#
4572# You should have received a copy of the GNU General Public License version
4573# 2 along with this work; if not, write to the Free Software Foundation,
4574# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4575#
4576# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4577# or visit www.oracle.com if you need additional information or have any
4578# questions.
4579#
4580
4581################################################################################
4582# Setup cups (Common Unix Printing System)
4583################################################################################
4584
4585
4586#
4587# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4588# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4589#
4590# This code is free software; you can redistribute it and/or modify it
4591# under the terms of the GNU General Public License version 2 only, as
4592# published by the Free Software Foundation.  Oracle designates this
4593# particular file as subject to the "Classpath" exception as provided
4594# by Oracle in the LICENSE file that accompanied this code.
4595#
4596# This code is distributed in the hope that it will be useful, but WITHOUT
4597# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4598# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4599# version 2 for more details (a copy is included in the LICENSE file that
4600# accompanied this code).
4601#
4602# You should have received a copy of the GNU General Public License version
4603# 2 along with this work; if not, write to the Free Software Foundation,
4604# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4605#
4606# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4607# or visit www.oracle.com if you need additional information or have any
4608# questions.
4609#
4610
4611################################################################################
4612# Setup libffi (Foreign Function Interface)
4613################################################################################
4614
4615
4616#
4617# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4618# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4619#
4620# This code is free software; you can redistribute it and/or modify it
4621# under the terms of the GNU General Public License version 2 only, as
4622# published by the Free Software Foundation.  Oracle designates this
4623# particular file as subject to the "Classpath" exception as provided
4624# by Oracle in the LICENSE file that accompanied this code.
4625#
4626# This code is distributed in the hope that it will be useful, but WITHOUT
4627# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4628# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4629# version 2 for more details (a copy is included in the LICENSE file that
4630# accompanied this code).
4631#
4632# You should have received a copy of the GNU General Public License version
4633# 2 along with this work; if not, write to the Free Software Foundation,
4634# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4635#
4636# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4637# or visit www.oracle.com if you need additional information or have any
4638# questions.
4639#
4640
4641################################################################################
4642# Build the freetype lib from source
4643################################################################################
4644
4645
4646################################################################################
4647# Check if a potential freeype library match is correct and usable
4648################################################################################
4649
4650
4651################################################################################
4652# Setup freetype (The FreeType2 font rendering library)
4653################################################################################
4654
4655
4656#
4657# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4658# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4659#
4660# This code is free software; you can redistribute it and/or modify it
4661# under the terms of the GNU General Public License version 2 only, as
4662# published by the Free Software Foundation.  Oracle designates this
4663# particular file as subject to the "Classpath" exception as provided
4664# by Oracle in the LICENSE file that accompanied this code.
4665#
4666# This code is distributed in the hope that it will be useful, but WITHOUT
4667# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4668# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4669# version 2 for more details (a copy is included in the LICENSE file that
4670# accompanied this code).
4671#
4672# You should have received a copy of the GNU General Public License version
4673# 2 along with this work; if not, write to the Free Software Foundation,
4674# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4675#
4676# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4677# or visit www.oracle.com if you need additional information or have any
4678# questions.
4679#
4680
4681################################################################################
4682# Setup the standard C/C++ runtime libraries.
4683#
4684# Most importantly, determine if stdc++ should be linked statically or
4685# dynamically.
4686################################################################################
4687
4688
4689#
4690# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4691# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4692#
4693# This code is free software; you can redistribute it and/or modify it
4694# under the terms of the GNU General Public License version 2 only, as
4695# published by the Free Software Foundation.  Oracle designates this
4696# particular file as subject to the "Classpath" exception as provided
4697# by Oracle in the LICENSE file that accompanied this code.
4698#
4699# This code is distributed in the hope that it will be useful, but WITHOUT
4700# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4701# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4702# version 2 for more details (a copy is included in the LICENSE file that
4703# accompanied this code).
4704#
4705# You should have received a copy of the GNU General Public License version
4706# 2 along with this work; if not, write to the Free Software Foundation,
4707# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4708#
4709# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4710# or visit www.oracle.com if you need additional information or have any
4711# questions.
4712#
4713
4714################################################################################
4715# Setup X11 Windows system
4716################################################################################
4717
4718
4719
4720################################################################################
4721# Determine which libraries are needed for this configuration
4722################################################################################
4723
4724
4725################################################################################
4726# Parse library options, and setup needed libraries
4727################################################################################
4728
4729
4730################################################################################
4731# Setup llvm (Low-Level VM)
4732################################################################################
4733
4734
4735################################################################################
4736# Setup various libraries, typically small system libraries
4737################################################################################
4738
4739
4740################################################################################
4741# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4742# redistribute it in the test image.
4743################################################################################
4744
4745
4746
4747#
4748# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4749# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4750#
4751# This code is free software; you can redistribute it and/or modify it
4752# under the terms of the GNU General Public License version 2 only, as
4753# published by the Free Software Foundation.  Oracle designates this
4754# particular file as subject to the "Classpath" exception as provided
4755# by Oracle in the LICENSE file that accompanied this code.
4756#
4757# This code is distributed in the hope that it will be useful, but WITHOUT
4758# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4759# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4760# version 2 for more details (a copy is included in the LICENSE file that
4761# accompanied this code).
4762#
4763# You should have received a copy of the GNU General Public License version
4764# 2 along with this work; if not, write to the Free Software Foundation,
4765# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4766#
4767# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4768# or visit www.oracle.com if you need additional information or have any
4769# questions.
4770#
4771
4772# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4773# Converts autoconf style CPU name to OpenJDK style, into
4774# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4775
4776
4777# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4778# Converts autoconf style OS name to OpenJDK style, into
4779# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4780
4781
4782# Expects $host_os $host_cpu $build_os and $build_cpu
4783# and $with_target_bits to have been setup!
4784#
4785# Translate the standard triplet(quadruplet) definition
4786# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4787# OPENJDK_BUILD_OS, etc.
4788
4789
4790# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4791# accordingly. Must be done after setting up build and target system, but before
4792# doing anything else with these values.
4793
4794
4795# Setup the legacy variables, for controlling the old makefiles.
4796#
4797
4798
4799# $1 - Either TARGET or BUILD to setup the variables for.
4800
4801
4802
4803
4804#%%% Build and target systems %%%
4805
4806
4807
4808
4809# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4810# Add -mX to various FLAGS variables.
4811
4812
4813
4814
4815
4816
4817#
4818# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4819# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4820#
4821# This code is free software; you can redistribute it and/or modify it
4822# under the terms of the GNU General Public License version 2 only, as
4823# published by the Free Software Foundation.  Oracle designates this
4824# particular file as subject to the "Classpath" exception as provided
4825# by Oracle in the LICENSE file that accompanied this code.
4826#
4827# This code is distributed in the hope that it will be useful, but WITHOUT
4828# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4829# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4830# version 2 for more details (a copy is included in the LICENSE file that
4831# accompanied this code).
4832#
4833# You should have received a copy of the GNU General Public License version
4834# 2 along with this work; if not, write to the Free Software Foundation,
4835# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4836#
4837# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4838# or visit www.oracle.com if you need additional information or have any
4839# questions.
4840#
4841
4842
4843
4844
4845
4846
4847
4848################################################################################
4849# Define a mechanism for importing extra prebuilt modules
4850#
4851
4852
4853
4854#
4855# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4856# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4857#
4858# This code is free software; you can redistribute it and/or modify it
4859# under the terms of the GNU General Public License version 2 only, as
4860# published by the Free Software Foundation.  Oracle designates this
4861# particular file as subject to the "Classpath" exception as provided
4862# by Oracle in the LICENSE file that accompanied this code.
4863#
4864# This code is distributed in the hope that it will be useful, but WITHOUT
4865# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4866# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4867# version 2 for more details (a copy is included in the LICENSE file that
4868# accompanied this code).
4869#
4870# You should have received a copy of the GNU General Public License version
4871# 2 along with this work; if not, write to the Free Software Foundation,
4872# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4873#
4874# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4875# or visit www.oracle.com if you need additional information or have any
4876# questions.
4877#
4878
4879########################################################################
4880# This file is responsible for detecting, verifying and setting up the
4881# toolchain, i.e. the compiler, linker and related utilities. It will setup
4882# proper paths to the binaries, but it will not setup any flags.
4883#
4884# The binaries used is determined by the toolchain type, which is the family of
4885# compilers and related tools that are used.
4886########################################################################
4887
4888
4889# All valid toolchains, regardless of platform (used by help.m4)
4890VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4891
4892# These toolchains are valid on different platforms
4893VALID_TOOLCHAINS_linux="gcc clang"
4894VALID_TOOLCHAINS_solaris="solstudio"
4895VALID_TOOLCHAINS_macosx="gcc clang"
4896VALID_TOOLCHAINS_aix="xlc"
4897VALID_TOOLCHAINS_windows="microsoft"
4898
4899# Toolchain descriptions
4900TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4901TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4902TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4903TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4904TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4905
4906# Minimum supported versions, empty means unspecified
4907TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4908TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4909TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
4910TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
4911TOOLCHAIN_MINIMUM_VERSION_xlc=""
4912
4913# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4914# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4915# $1 - optional variable prefix for compiler and version variables (BUILD_)
4916# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4917
4918
4919# Check if the configured compiler (C and C++) is of a specific version or
4920# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4921#
4922# Arguments:
4923#   VERSION:   The version string to check against the found version
4924#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4925#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4926#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4927
4928
4929
4930
4931# Setup a number of variables describing how native output files are
4932# named on this platform/toolchain.
4933
4934
4935# Determine which toolchain type to use, and make sure it is valid for this
4936# platform. Setup various information about the selected toolchain.
4937
4938
4939# Before we start detecting the toolchain executables, we might need some
4940# special setup, e.g. additional paths etc.
4941
4942
4943# Restore path, etc
4944
4945
4946# Check if a compiler is of the toolchain type we expect, and save the version
4947# information from it. If the compiler does not match the expected type,
4948# this function will abort using AC_MSG_ERROR. If it matches, the version will
4949# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4950# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4951#
4952# $1 = compiler to test (CC or CXX)
4953# $2 = human readable name of compiler (C or C++)
4954
4955
4956# Try to locate the given C or C++ compiler in the path, or otherwise.
4957#
4958# $1 = compiler to test (CC or CXX)
4959# $2 = human readable name of compiler (C or C++)
4960# $3 = list of compiler names to search for
4961
4962
4963# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4964# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4965# archiver (AR). Verify that the compilers are correct according to the
4966# toolchain type.
4967
4968
4969# Setup additional tools that is considered a part of the toolchain, but not the
4970# core part. Many of these are highly platform-specific and do not exist,
4971# and/or are not needed on all platforms.
4972
4973
4974# Setup the build tools (i.e, the compiler and linker used to build programs
4975# that should be run on the build platform, not the target platform, as a build
4976# helper). Since the non-cross-compile case uses the normal, target compilers
4977# for this, we can only do this after these have been setup.
4978
4979
4980# Do some additional checks on the detected tools.
4981
4982
4983# Setup the JTReg Regression Test Harness.
4984
4985
4986#
4987# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4988# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4989#
4990# This code is free software; you can redistribute it and/or modify it
4991# under the terms of the GNU General Public License version 2 only, as
4992# published by the Free Software Foundation.  Oracle designates this
4993# particular file as subject to the "Classpath" exception as provided
4994# by Oracle in the LICENSE file that accompanied this code.
4995#
4996# This code is distributed in the hope that it will be useful, but WITHOUT
4997# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4998# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4999# version 2 for more details (a copy is included in the LICENSE file that
5000# accompanied this code).
5001#
5002# You should have received a copy of the GNU General Public License version
5003# 2 along with this work; if not, write to the Free Software Foundation,
5004# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5005#
5006# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5007# or visit www.oracle.com if you need additional information or have any
5008# questions.
5009#
5010
5011################################################################################
5012# The order of these defines the priority by which we try to find them.
5013VALID_VS_VERSIONS="2013 2012 2010"
5014
5015VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5016VS_VERSION_INTERNAL_2010=100
5017VS_MSVCR_2010=msvcr100.dll
5018# We don't use msvcp on Visual Studio 2010
5019#VS_MSVCP_2010=msvcp100.dll
5020VS_ENVVAR_2010="VS100COMNTOOLS"
5021VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5022VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5023VS_VS_PLATFORM_NAME_2010="v100"
5024VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5025
5026VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5027VS_VERSION_INTERNAL_2012=110
5028VS_MSVCR_2012=msvcr110.dll
5029VS_MSVCP_2012=msvcp110.dll
5030VS_ENVVAR_2012="VS110COMNTOOLS"
5031VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5032VS_SDK_INSTALLDIR_2012=
5033VS_VS_PLATFORM_NAME_2012="v110"
5034VS_SDK_PLATFORM_NAME_2012=
5035
5036VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5037VS_VERSION_INTERNAL_2013=120
5038VS_MSVCR_2013=msvcr120.dll
5039VS_MSVCP_2013=msvcp120.dll
5040VS_ENVVAR_2013="VS120COMNTOOLS"
5041VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5042VS_SDK_INSTALLDIR_2013=
5043VS_VS_PLATFORM_NAME_2013="v120"
5044VS_SDK_PLATFORM_NAME_2013=
5045
5046################################################################################
5047
5048
5049
5050################################################################################
5051
5052
5053
5054################################################################################
5055# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5056# build environment and assigns it to VS_ENV_CMD
5057
5058
5059################################################################################
5060
5061
5062
5063################################################################################
5064# Check if the VS env variables were setup prior to running configure.
5065# If not, then find vcvarsall.bat and run it automatically, and integrate
5066# the set env variables into the spec file.
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081# This line needs to be here, verbatim, after all includes and the dummy hook
5082# definitions. It is replaced with custom functionality when building
5083# custom sources.
5084#CUSTOM_AUTOCONF_INCLUDE
5085
5086# Do not change or remove the following line, it is needed for consistency checks:
5087DATE_WHEN_GENERATED=1480690601
5088
5089###############################################################################
5090#
5091# Initialization / Boot-strapping
5092#
5093# The bootstrapping process needs to solve the "chicken or the egg" problem,
5094# thus it jumps back and forth, each time gaining something needed later on.
5095#
5096###############################################################################
5097
5098# If we are requested to print additional help, do that and then exit.
5099# This must be the very first call.
5100
5101  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5102
5103    # Print available toolchains
5104    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5105    $PRINTF "Which are valid to use depends on the build platform.\n"
5106    for toolchain in $VALID_TOOLCHAINS_all; do
5107      # Use indirect variable referencing
5108      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5109      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5110      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5111    done
5112    $PRINTF "\n"
5113
5114    # Print available jvm features
5115    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5116    $PRINTF "Which are valid to use depends on the target platform.\n  "
5117    $PRINTF "%s " $VALID_JVM_FEATURES
5118    $PRINTF "\n"
5119
5120    # And now exit directly
5121    exit 0
5122  fi
5123
5124
5125# Basic initialization that must happen first of all in the normal process.
5126
5127  # Save the original command line. This is passed to us by the wrapper configure script.
5128
5129  # Save the path variable before it gets changed
5130  ORIGINAL_PATH="$PATH"
5131
5132  DATE_WHEN_CONFIGURED=`LANG=C date`
5133
5134  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5135$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5136  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5137$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5138
5139
5140  # Start with tools that do not need have cross compilation support
5141  # and can be expected to be found in the default PATH. These tools are
5142  # used by configure.
5143
5144  # First are all the simple required tools.
5145
5146
5147
5148  # Publish this variable in the help.
5149
5150
5151  if [ -z "${BASENAME+x}" ]; then
5152    # The variable is not set by user, try to locate tool using the code snippet
5153    for ac_prog in basename
5154do
5155  # Extract the first word of "$ac_prog", so it can be a program name with args.
5156set dummy $ac_prog; ac_word=$2
5157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5158$as_echo_n "checking for $ac_word... " >&6; }
5159if ${ac_cv_path_BASENAME+:} false; then :
5160  $as_echo_n "(cached) " >&6
5161else
5162  case $BASENAME in
5163  [\\/]* | ?:[\\/]*)
5164  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5165  ;;
5166  *)
5167  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5168for as_dir in $PATH
5169do
5170  IFS=$as_save_IFS
5171  test -z "$as_dir" && as_dir=.
5172    for ac_exec_ext in '' $ac_executable_extensions; do
5173  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5174    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5176    break 2
5177  fi
5178done
5179  done
5180IFS=$as_save_IFS
5181
5182  ;;
5183esac
5184fi
5185BASENAME=$ac_cv_path_BASENAME
5186if test -n "$BASENAME"; then
5187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5188$as_echo "$BASENAME" >&6; }
5189else
5190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5191$as_echo "no" >&6; }
5192fi
5193
5194
5195  test -n "$BASENAME" && break
5196done
5197
5198  else
5199    # The variable is set, but is it from the command line or the environment?
5200
5201    # Try to remove the string !BASENAME! from our list.
5202    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5203    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5204      # If it failed, the variable was not from the command line. Ignore it,
5205      # but warn the user (except for BASH, which is always set by the calling BASH).
5206      if test "xBASENAME" != xBASH; then
5207        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5208$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5209      fi
5210      # Try to locate tool using the code snippet
5211      for ac_prog in basename
5212do
5213  # Extract the first word of "$ac_prog", so it can be a program name with args.
5214set dummy $ac_prog; ac_word=$2
5215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5216$as_echo_n "checking for $ac_word... " >&6; }
5217if ${ac_cv_path_BASENAME+:} false; then :
5218  $as_echo_n "(cached) " >&6
5219else
5220  case $BASENAME in
5221  [\\/]* | ?:[\\/]*)
5222  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5223  ;;
5224  *)
5225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5226for as_dir in $PATH
5227do
5228  IFS=$as_save_IFS
5229  test -z "$as_dir" && as_dir=.
5230    for ac_exec_ext in '' $ac_executable_extensions; do
5231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5232    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5234    break 2
5235  fi
5236done
5237  done
5238IFS=$as_save_IFS
5239
5240  ;;
5241esac
5242fi
5243BASENAME=$ac_cv_path_BASENAME
5244if test -n "$BASENAME"; then
5245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5246$as_echo "$BASENAME" >&6; }
5247else
5248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5249$as_echo "no" >&6; }
5250fi
5251
5252
5253  test -n "$BASENAME" && break
5254done
5255
5256    else
5257      # If it succeeded, then it was overridden by the user. We will use it
5258      # for the tool.
5259
5260      # First remove it from the list of overridden variables, so we can test
5261      # for unknown variables in the end.
5262      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5263
5264      # Check if we try to supply an empty value
5265      if test "x$BASENAME" = x; then
5266        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5267$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5268        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5269$as_echo_n "checking for BASENAME... " >&6; }
5270        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5271$as_echo "disabled" >&6; }
5272      else
5273        # Check if the provided tool contains a complete path.
5274        tool_specified="$BASENAME"
5275        tool_basename="${tool_specified##*/}"
5276        if test "x$tool_basename" = "x$tool_specified"; then
5277          # A command without a complete path is provided, search $PATH.
5278          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5279$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5280          # Extract the first word of "$tool_basename", so it can be a program name with args.
5281set dummy $tool_basename; ac_word=$2
5282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5283$as_echo_n "checking for $ac_word... " >&6; }
5284if ${ac_cv_path_BASENAME+:} false; then :
5285  $as_echo_n "(cached) " >&6
5286else
5287  case $BASENAME in
5288  [\\/]* | ?:[\\/]*)
5289  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5290  ;;
5291  *)
5292  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5293for as_dir in $PATH
5294do
5295  IFS=$as_save_IFS
5296  test -z "$as_dir" && as_dir=.
5297    for ac_exec_ext in '' $ac_executable_extensions; do
5298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5299    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5301    break 2
5302  fi
5303done
5304  done
5305IFS=$as_save_IFS
5306
5307  ;;
5308esac
5309fi
5310BASENAME=$ac_cv_path_BASENAME
5311if test -n "$BASENAME"; then
5312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5313$as_echo "$BASENAME" >&6; }
5314else
5315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5316$as_echo "no" >&6; }
5317fi
5318
5319
5320          if test "x$BASENAME" = x; then
5321            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5322          fi
5323        else
5324          # Otherwise we believe it is a complete path. Use it as it is.
5325          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5326$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5327          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5328$as_echo_n "checking for BASENAME... " >&6; }
5329          if test ! -x "$tool_specified"; then
5330            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5331$as_echo "not found" >&6; }
5332            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5333          fi
5334          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5335$as_echo "$tool_specified" >&6; }
5336        fi
5337      fi
5338    fi
5339
5340  fi
5341
5342
5343
5344  if test "x$BASENAME" = x; then
5345    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5346  fi
5347
5348
5349
5350
5351
5352  # Publish this variable in the help.
5353
5354
5355  if [ -z "${BASH+x}" ]; then
5356    # The variable is not set by user, try to locate tool using the code snippet
5357    for ac_prog in bash
5358do
5359  # Extract the first word of "$ac_prog", so it can be a program name with args.
5360set dummy $ac_prog; ac_word=$2
5361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5362$as_echo_n "checking for $ac_word... " >&6; }
5363if ${ac_cv_path_BASH+:} false; then :
5364  $as_echo_n "(cached) " >&6
5365else
5366  case $BASH in
5367  [\\/]* | ?:[\\/]*)
5368  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5369  ;;
5370  *)
5371  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5372for as_dir in $PATH
5373do
5374  IFS=$as_save_IFS
5375  test -z "$as_dir" && as_dir=.
5376    for ac_exec_ext in '' $ac_executable_extensions; do
5377  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5378    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5379    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5380    break 2
5381  fi
5382done
5383  done
5384IFS=$as_save_IFS
5385
5386  ;;
5387esac
5388fi
5389BASH=$ac_cv_path_BASH
5390if test -n "$BASH"; then
5391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5392$as_echo "$BASH" >&6; }
5393else
5394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5395$as_echo "no" >&6; }
5396fi
5397
5398
5399  test -n "$BASH" && break
5400done
5401
5402  else
5403    # The variable is set, but is it from the command line or the environment?
5404
5405    # Try to remove the string !BASH! from our list.
5406    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5407    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5408      # If it failed, the variable was not from the command line. Ignore it,
5409      # but warn the user (except for BASH, which is always set by the calling BASH).
5410      if test "xBASH" != xBASH; then
5411        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5412$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5413      fi
5414      # Try to locate tool using the code snippet
5415      for ac_prog in bash
5416do
5417  # Extract the first word of "$ac_prog", so it can be a program name with args.
5418set dummy $ac_prog; ac_word=$2
5419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5420$as_echo_n "checking for $ac_word... " >&6; }
5421if ${ac_cv_path_BASH+:} false; then :
5422  $as_echo_n "(cached) " >&6
5423else
5424  case $BASH in
5425  [\\/]* | ?:[\\/]*)
5426  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5427  ;;
5428  *)
5429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5430for as_dir in $PATH
5431do
5432  IFS=$as_save_IFS
5433  test -z "$as_dir" && as_dir=.
5434    for ac_exec_ext in '' $ac_executable_extensions; do
5435  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5436    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5438    break 2
5439  fi
5440done
5441  done
5442IFS=$as_save_IFS
5443
5444  ;;
5445esac
5446fi
5447BASH=$ac_cv_path_BASH
5448if test -n "$BASH"; then
5449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5450$as_echo "$BASH" >&6; }
5451else
5452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5453$as_echo "no" >&6; }
5454fi
5455
5456
5457  test -n "$BASH" && break
5458done
5459
5460    else
5461      # If it succeeded, then it was overridden by the user. We will use it
5462      # for the tool.
5463
5464      # First remove it from the list of overridden variables, so we can test
5465      # for unknown variables in the end.
5466      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5467
5468      # Check if we try to supply an empty value
5469      if test "x$BASH" = x; then
5470        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5471$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5472        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5473$as_echo_n "checking for BASH... " >&6; }
5474        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5475$as_echo "disabled" >&6; }
5476      else
5477        # Check if the provided tool contains a complete path.
5478        tool_specified="$BASH"
5479        tool_basename="${tool_specified##*/}"
5480        if test "x$tool_basename" = "x$tool_specified"; then
5481          # A command without a complete path is provided, search $PATH.
5482          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5483$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5484          # Extract the first word of "$tool_basename", so it can be a program name with args.
5485set dummy $tool_basename; ac_word=$2
5486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5487$as_echo_n "checking for $ac_word... " >&6; }
5488if ${ac_cv_path_BASH+:} false; then :
5489  $as_echo_n "(cached) " >&6
5490else
5491  case $BASH in
5492  [\\/]* | ?:[\\/]*)
5493  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5494  ;;
5495  *)
5496  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5497for as_dir in $PATH
5498do
5499  IFS=$as_save_IFS
5500  test -z "$as_dir" && as_dir=.
5501    for ac_exec_ext in '' $ac_executable_extensions; do
5502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5503    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5505    break 2
5506  fi
5507done
5508  done
5509IFS=$as_save_IFS
5510
5511  ;;
5512esac
5513fi
5514BASH=$ac_cv_path_BASH
5515if test -n "$BASH"; then
5516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5517$as_echo "$BASH" >&6; }
5518else
5519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5520$as_echo "no" >&6; }
5521fi
5522
5523
5524          if test "x$BASH" = x; then
5525            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5526          fi
5527        else
5528          # Otherwise we believe it is a complete path. Use it as it is.
5529          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5530$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5531          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5532$as_echo_n "checking for BASH... " >&6; }
5533          if test ! -x "$tool_specified"; then
5534            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5535$as_echo "not found" >&6; }
5536            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5537          fi
5538          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5539$as_echo "$tool_specified" >&6; }
5540        fi
5541      fi
5542    fi
5543
5544  fi
5545
5546
5547
5548  if test "x$BASH" = x; then
5549    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5550  fi
5551
5552
5553
5554
5555
5556  # Publish this variable in the help.
5557
5558
5559  if [ -z "${CAT+x}" ]; then
5560    # The variable is not set by user, try to locate tool using the code snippet
5561    for ac_prog in cat
5562do
5563  # Extract the first word of "$ac_prog", so it can be a program name with args.
5564set dummy $ac_prog; ac_word=$2
5565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5566$as_echo_n "checking for $ac_word... " >&6; }
5567if ${ac_cv_path_CAT+:} false; then :
5568  $as_echo_n "(cached) " >&6
5569else
5570  case $CAT in
5571  [\\/]* | ?:[\\/]*)
5572  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5573  ;;
5574  *)
5575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5576for as_dir in $PATH
5577do
5578  IFS=$as_save_IFS
5579  test -z "$as_dir" && as_dir=.
5580    for ac_exec_ext in '' $ac_executable_extensions; do
5581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5582    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5584    break 2
5585  fi
5586done
5587  done
5588IFS=$as_save_IFS
5589
5590  ;;
5591esac
5592fi
5593CAT=$ac_cv_path_CAT
5594if test -n "$CAT"; then
5595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5596$as_echo "$CAT" >&6; }
5597else
5598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5599$as_echo "no" >&6; }
5600fi
5601
5602
5603  test -n "$CAT" && break
5604done
5605
5606  else
5607    # The variable is set, but is it from the command line or the environment?
5608
5609    # Try to remove the string !CAT! from our list.
5610    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5611    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5612      # If it failed, the variable was not from the command line. Ignore it,
5613      # but warn the user (except for BASH, which is always set by the calling BASH).
5614      if test "xCAT" != xBASH; then
5615        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5616$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5617      fi
5618      # Try to locate tool using the code snippet
5619      for ac_prog in cat
5620do
5621  # Extract the first word of "$ac_prog", so it can be a program name with args.
5622set dummy $ac_prog; ac_word=$2
5623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5624$as_echo_n "checking for $ac_word... " >&6; }
5625if ${ac_cv_path_CAT+:} false; then :
5626  $as_echo_n "(cached) " >&6
5627else
5628  case $CAT in
5629  [\\/]* | ?:[\\/]*)
5630  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5631  ;;
5632  *)
5633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5634for as_dir in $PATH
5635do
5636  IFS=$as_save_IFS
5637  test -z "$as_dir" && as_dir=.
5638    for ac_exec_ext in '' $ac_executable_extensions; do
5639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5640    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5642    break 2
5643  fi
5644done
5645  done
5646IFS=$as_save_IFS
5647
5648  ;;
5649esac
5650fi
5651CAT=$ac_cv_path_CAT
5652if test -n "$CAT"; then
5653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5654$as_echo "$CAT" >&6; }
5655else
5656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5657$as_echo "no" >&6; }
5658fi
5659
5660
5661  test -n "$CAT" && break
5662done
5663
5664    else
5665      # If it succeeded, then it was overridden by the user. We will use it
5666      # for the tool.
5667
5668      # First remove it from the list of overridden variables, so we can test
5669      # for unknown variables in the end.
5670      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5671
5672      # Check if we try to supply an empty value
5673      if test "x$CAT" = x; then
5674        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5675$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5676        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5677$as_echo_n "checking for CAT... " >&6; }
5678        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5679$as_echo "disabled" >&6; }
5680      else
5681        # Check if the provided tool contains a complete path.
5682        tool_specified="$CAT"
5683        tool_basename="${tool_specified##*/}"
5684        if test "x$tool_basename" = "x$tool_specified"; then
5685          # A command without a complete path is provided, search $PATH.
5686          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5687$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5688          # Extract the first word of "$tool_basename", so it can be a program name with args.
5689set dummy $tool_basename; ac_word=$2
5690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5691$as_echo_n "checking for $ac_word... " >&6; }
5692if ${ac_cv_path_CAT+:} false; then :
5693  $as_echo_n "(cached) " >&6
5694else
5695  case $CAT in
5696  [\\/]* | ?:[\\/]*)
5697  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5698  ;;
5699  *)
5700  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5701for as_dir in $PATH
5702do
5703  IFS=$as_save_IFS
5704  test -z "$as_dir" && as_dir=.
5705    for ac_exec_ext in '' $ac_executable_extensions; do
5706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5707    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5709    break 2
5710  fi
5711done
5712  done
5713IFS=$as_save_IFS
5714
5715  ;;
5716esac
5717fi
5718CAT=$ac_cv_path_CAT
5719if test -n "$CAT"; then
5720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5721$as_echo "$CAT" >&6; }
5722else
5723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5724$as_echo "no" >&6; }
5725fi
5726
5727
5728          if test "x$CAT" = x; then
5729            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5730          fi
5731        else
5732          # Otherwise we believe it is a complete path. Use it as it is.
5733          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5734$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5735          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5736$as_echo_n "checking for CAT... " >&6; }
5737          if test ! -x "$tool_specified"; then
5738            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5739$as_echo "not found" >&6; }
5740            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5741          fi
5742          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5743$as_echo "$tool_specified" >&6; }
5744        fi
5745      fi
5746    fi
5747
5748  fi
5749
5750
5751
5752  if test "x$CAT" = x; then
5753    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5754  fi
5755
5756
5757
5758
5759
5760  # Publish this variable in the help.
5761
5762
5763  if [ -z "${CHMOD+x}" ]; then
5764    # The variable is not set by user, try to locate tool using the code snippet
5765    for ac_prog in chmod
5766do
5767  # Extract the first word of "$ac_prog", so it can be a program name with args.
5768set dummy $ac_prog; ac_word=$2
5769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5770$as_echo_n "checking for $ac_word... " >&6; }
5771if ${ac_cv_path_CHMOD+:} false; then :
5772  $as_echo_n "(cached) " >&6
5773else
5774  case $CHMOD in
5775  [\\/]* | ?:[\\/]*)
5776  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5777  ;;
5778  *)
5779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5780for as_dir in $PATH
5781do
5782  IFS=$as_save_IFS
5783  test -z "$as_dir" && as_dir=.
5784    for ac_exec_ext in '' $ac_executable_extensions; do
5785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5786    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5788    break 2
5789  fi
5790done
5791  done
5792IFS=$as_save_IFS
5793
5794  ;;
5795esac
5796fi
5797CHMOD=$ac_cv_path_CHMOD
5798if test -n "$CHMOD"; then
5799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5800$as_echo "$CHMOD" >&6; }
5801else
5802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5803$as_echo "no" >&6; }
5804fi
5805
5806
5807  test -n "$CHMOD" && break
5808done
5809
5810  else
5811    # The variable is set, but is it from the command line or the environment?
5812
5813    # Try to remove the string !CHMOD! from our list.
5814    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5815    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5816      # If it failed, the variable was not from the command line. Ignore it,
5817      # but warn the user (except for BASH, which is always set by the calling BASH).
5818      if test "xCHMOD" != xBASH; then
5819        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5820$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5821      fi
5822      # Try to locate tool using the code snippet
5823      for ac_prog in chmod
5824do
5825  # Extract the first word of "$ac_prog", so it can be a program name with args.
5826set dummy $ac_prog; ac_word=$2
5827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5828$as_echo_n "checking for $ac_word... " >&6; }
5829if ${ac_cv_path_CHMOD+:} false; then :
5830  $as_echo_n "(cached) " >&6
5831else
5832  case $CHMOD in
5833  [\\/]* | ?:[\\/]*)
5834  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5835  ;;
5836  *)
5837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5838for as_dir in $PATH
5839do
5840  IFS=$as_save_IFS
5841  test -z "$as_dir" && as_dir=.
5842    for ac_exec_ext in '' $ac_executable_extensions; do
5843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5844    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5846    break 2
5847  fi
5848done
5849  done
5850IFS=$as_save_IFS
5851
5852  ;;
5853esac
5854fi
5855CHMOD=$ac_cv_path_CHMOD
5856if test -n "$CHMOD"; then
5857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5858$as_echo "$CHMOD" >&6; }
5859else
5860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5861$as_echo "no" >&6; }
5862fi
5863
5864
5865  test -n "$CHMOD" && break
5866done
5867
5868    else
5869      # If it succeeded, then it was overridden by the user. We will use it
5870      # for the tool.
5871
5872      # First remove it from the list of overridden variables, so we can test
5873      # for unknown variables in the end.
5874      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5875
5876      # Check if we try to supply an empty value
5877      if test "x$CHMOD" = x; then
5878        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5879$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5880        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5881$as_echo_n "checking for CHMOD... " >&6; }
5882        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5883$as_echo "disabled" >&6; }
5884      else
5885        # Check if the provided tool contains a complete path.
5886        tool_specified="$CHMOD"
5887        tool_basename="${tool_specified##*/}"
5888        if test "x$tool_basename" = "x$tool_specified"; then
5889          # A command without a complete path is provided, search $PATH.
5890          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5891$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5892          # Extract the first word of "$tool_basename", so it can be a program name with args.
5893set dummy $tool_basename; ac_word=$2
5894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5895$as_echo_n "checking for $ac_word... " >&6; }
5896if ${ac_cv_path_CHMOD+:} false; then :
5897  $as_echo_n "(cached) " >&6
5898else
5899  case $CHMOD in
5900  [\\/]* | ?:[\\/]*)
5901  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5902  ;;
5903  *)
5904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5905for as_dir in $PATH
5906do
5907  IFS=$as_save_IFS
5908  test -z "$as_dir" && as_dir=.
5909    for ac_exec_ext in '' $ac_executable_extensions; do
5910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5911    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5913    break 2
5914  fi
5915done
5916  done
5917IFS=$as_save_IFS
5918
5919  ;;
5920esac
5921fi
5922CHMOD=$ac_cv_path_CHMOD
5923if test -n "$CHMOD"; then
5924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5925$as_echo "$CHMOD" >&6; }
5926else
5927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5928$as_echo "no" >&6; }
5929fi
5930
5931
5932          if test "x$CHMOD" = x; then
5933            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5934          fi
5935        else
5936          # Otherwise we believe it is a complete path. Use it as it is.
5937          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5938$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5939          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5940$as_echo_n "checking for CHMOD... " >&6; }
5941          if test ! -x "$tool_specified"; then
5942            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5943$as_echo "not found" >&6; }
5944            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5945          fi
5946          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5947$as_echo "$tool_specified" >&6; }
5948        fi
5949      fi
5950    fi
5951
5952  fi
5953
5954
5955
5956  if test "x$CHMOD" = x; then
5957    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5958  fi
5959
5960
5961
5962
5963
5964  # Publish this variable in the help.
5965
5966
5967  if [ -z "${CMP+x}" ]; then
5968    # The variable is not set by user, try to locate tool using the code snippet
5969    for ac_prog in cmp
5970do
5971  # Extract the first word of "$ac_prog", so it can be a program name with args.
5972set dummy $ac_prog; ac_word=$2
5973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5974$as_echo_n "checking for $ac_word... " >&6; }
5975if ${ac_cv_path_CMP+:} false; then :
5976  $as_echo_n "(cached) " >&6
5977else
5978  case $CMP in
5979  [\\/]* | ?:[\\/]*)
5980  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5981  ;;
5982  *)
5983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5984for as_dir in $PATH
5985do
5986  IFS=$as_save_IFS
5987  test -z "$as_dir" && as_dir=.
5988    for ac_exec_ext in '' $ac_executable_extensions; do
5989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5990    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5992    break 2
5993  fi
5994done
5995  done
5996IFS=$as_save_IFS
5997
5998  ;;
5999esac
6000fi
6001CMP=$ac_cv_path_CMP
6002if test -n "$CMP"; then
6003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6004$as_echo "$CMP" >&6; }
6005else
6006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6007$as_echo "no" >&6; }
6008fi
6009
6010
6011  test -n "$CMP" && break
6012done
6013
6014  else
6015    # The variable is set, but is it from the command line or the environment?
6016
6017    # Try to remove the string !CMP! from our list.
6018    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6019    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6020      # If it failed, the variable was not from the command line. Ignore it,
6021      # but warn the user (except for BASH, which is always set by the calling BASH).
6022      if test "xCMP" != xBASH; then
6023        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6024$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6025      fi
6026      # Try to locate tool using the code snippet
6027      for ac_prog in cmp
6028do
6029  # Extract the first word of "$ac_prog", so it can be a program name with args.
6030set dummy $ac_prog; ac_word=$2
6031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6032$as_echo_n "checking for $ac_word... " >&6; }
6033if ${ac_cv_path_CMP+:} false; then :
6034  $as_echo_n "(cached) " >&6
6035else
6036  case $CMP in
6037  [\\/]* | ?:[\\/]*)
6038  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6039  ;;
6040  *)
6041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6042for as_dir in $PATH
6043do
6044  IFS=$as_save_IFS
6045  test -z "$as_dir" && as_dir=.
6046    for ac_exec_ext in '' $ac_executable_extensions; do
6047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6048    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6050    break 2
6051  fi
6052done
6053  done
6054IFS=$as_save_IFS
6055
6056  ;;
6057esac
6058fi
6059CMP=$ac_cv_path_CMP
6060if test -n "$CMP"; then
6061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6062$as_echo "$CMP" >&6; }
6063else
6064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6065$as_echo "no" >&6; }
6066fi
6067
6068
6069  test -n "$CMP" && break
6070done
6071
6072    else
6073      # If it succeeded, then it was overridden by the user. We will use it
6074      # for the tool.
6075
6076      # First remove it from the list of overridden variables, so we can test
6077      # for unknown variables in the end.
6078      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6079
6080      # Check if we try to supply an empty value
6081      if test "x$CMP" = x; then
6082        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6083$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6084        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6085$as_echo_n "checking for CMP... " >&6; }
6086        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6087$as_echo "disabled" >&6; }
6088      else
6089        # Check if the provided tool contains a complete path.
6090        tool_specified="$CMP"
6091        tool_basename="${tool_specified##*/}"
6092        if test "x$tool_basename" = "x$tool_specified"; then
6093          # A command without a complete path is provided, search $PATH.
6094          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6095$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6096          # Extract the first word of "$tool_basename", so it can be a program name with args.
6097set dummy $tool_basename; ac_word=$2
6098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6099$as_echo_n "checking for $ac_word... " >&6; }
6100if ${ac_cv_path_CMP+:} false; then :
6101  $as_echo_n "(cached) " >&6
6102else
6103  case $CMP in
6104  [\\/]* | ?:[\\/]*)
6105  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6106  ;;
6107  *)
6108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6109for as_dir in $PATH
6110do
6111  IFS=$as_save_IFS
6112  test -z "$as_dir" && as_dir=.
6113    for ac_exec_ext in '' $ac_executable_extensions; do
6114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6115    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6117    break 2
6118  fi
6119done
6120  done
6121IFS=$as_save_IFS
6122
6123  ;;
6124esac
6125fi
6126CMP=$ac_cv_path_CMP
6127if test -n "$CMP"; then
6128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6129$as_echo "$CMP" >&6; }
6130else
6131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6132$as_echo "no" >&6; }
6133fi
6134
6135
6136          if test "x$CMP" = x; then
6137            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6138          fi
6139        else
6140          # Otherwise we believe it is a complete path. Use it as it is.
6141          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6142$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6143          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6144$as_echo_n "checking for CMP... " >&6; }
6145          if test ! -x "$tool_specified"; then
6146            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6147$as_echo "not found" >&6; }
6148            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6149          fi
6150          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6151$as_echo "$tool_specified" >&6; }
6152        fi
6153      fi
6154    fi
6155
6156  fi
6157
6158
6159
6160  if test "x$CMP" = x; then
6161    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6162  fi
6163
6164
6165
6166
6167
6168  # Publish this variable in the help.
6169
6170
6171  if [ -z "${COMM+x}" ]; then
6172    # The variable is not set by user, try to locate tool using the code snippet
6173    for ac_prog in comm
6174do
6175  # Extract the first word of "$ac_prog", so it can be a program name with args.
6176set dummy $ac_prog; ac_word=$2
6177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6178$as_echo_n "checking for $ac_word... " >&6; }
6179if ${ac_cv_path_COMM+:} false; then :
6180  $as_echo_n "(cached) " >&6
6181else
6182  case $COMM in
6183  [\\/]* | ?:[\\/]*)
6184  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6185  ;;
6186  *)
6187  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6188for as_dir in $PATH
6189do
6190  IFS=$as_save_IFS
6191  test -z "$as_dir" && as_dir=.
6192    for ac_exec_ext in '' $ac_executable_extensions; do
6193  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6194    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6196    break 2
6197  fi
6198done
6199  done
6200IFS=$as_save_IFS
6201
6202  ;;
6203esac
6204fi
6205COMM=$ac_cv_path_COMM
6206if test -n "$COMM"; then
6207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6208$as_echo "$COMM" >&6; }
6209else
6210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6211$as_echo "no" >&6; }
6212fi
6213
6214
6215  test -n "$COMM" && break
6216done
6217
6218  else
6219    # The variable is set, but is it from the command line or the environment?
6220
6221    # Try to remove the string !COMM! from our list.
6222    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6223    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6224      # If it failed, the variable was not from the command line. Ignore it,
6225      # but warn the user (except for BASH, which is always set by the calling BASH).
6226      if test "xCOMM" != xBASH; then
6227        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6228$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6229      fi
6230      # Try to locate tool using the code snippet
6231      for ac_prog in comm
6232do
6233  # Extract the first word of "$ac_prog", so it can be a program name with args.
6234set dummy $ac_prog; ac_word=$2
6235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6236$as_echo_n "checking for $ac_word... " >&6; }
6237if ${ac_cv_path_COMM+:} false; then :
6238  $as_echo_n "(cached) " >&6
6239else
6240  case $COMM in
6241  [\\/]* | ?:[\\/]*)
6242  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6243  ;;
6244  *)
6245  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6246for as_dir in $PATH
6247do
6248  IFS=$as_save_IFS
6249  test -z "$as_dir" && as_dir=.
6250    for ac_exec_ext in '' $ac_executable_extensions; do
6251  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6252    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6254    break 2
6255  fi
6256done
6257  done
6258IFS=$as_save_IFS
6259
6260  ;;
6261esac
6262fi
6263COMM=$ac_cv_path_COMM
6264if test -n "$COMM"; then
6265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6266$as_echo "$COMM" >&6; }
6267else
6268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6269$as_echo "no" >&6; }
6270fi
6271
6272
6273  test -n "$COMM" && break
6274done
6275
6276    else
6277      # If it succeeded, then it was overridden by the user. We will use it
6278      # for the tool.
6279
6280      # First remove it from the list of overridden variables, so we can test
6281      # for unknown variables in the end.
6282      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6283
6284      # Check if we try to supply an empty value
6285      if test "x$COMM" = x; then
6286        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6287$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6288        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6289$as_echo_n "checking for COMM... " >&6; }
6290        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6291$as_echo "disabled" >&6; }
6292      else
6293        # Check if the provided tool contains a complete path.
6294        tool_specified="$COMM"
6295        tool_basename="${tool_specified##*/}"
6296        if test "x$tool_basename" = "x$tool_specified"; then
6297          # A command without a complete path is provided, search $PATH.
6298          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6299$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6300          # Extract the first word of "$tool_basename", so it can be a program name with args.
6301set dummy $tool_basename; ac_word=$2
6302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6303$as_echo_n "checking for $ac_word... " >&6; }
6304if ${ac_cv_path_COMM+:} false; then :
6305  $as_echo_n "(cached) " >&6
6306else
6307  case $COMM in
6308  [\\/]* | ?:[\\/]*)
6309  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6310  ;;
6311  *)
6312  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6313for as_dir in $PATH
6314do
6315  IFS=$as_save_IFS
6316  test -z "$as_dir" && as_dir=.
6317    for ac_exec_ext in '' $ac_executable_extensions; do
6318  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6319    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6321    break 2
6322  fi
6323done
6324  done
6325IFS=$as_save_IFS
6326
6327  ;;
6328esac
6329fi
6330COMM=$ac_cv_path_COMM
6331if test -n "$COMM"; then
6332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6333$as_echo "$COMM" >&6; }
6334else
6335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6336$as_echo "no" >&6; }
6337fi
6338
6339
6340          if test "x$COMM" = x; then
6341            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6342          fi
6343        else
6344          # Otherwise we believe it is a complete path. Use it as it is.
6345          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6346$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6347          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6348$as_echo_n "checking for COMM... " >&6; }
6349          if test ! -x "$tool_specified"; then
6350            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6351$as_echo "not found" >&6; }
6352            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6353          fi
6354          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6355$as_echo "$tool_specified" >&6; }
6356        fi
6357      fi
6358    fi
6359
6360  fi
6361
6362
6363
6364  if test "x$COMM" = x; then
6365    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6366  fi
6367
6368
6369
6370
6371
6372  # Publish this variable in the help.
6373
6374
6375  if [ -z "${CP+x}" ]; then
6376    # The variable is not set by user, try to locate tool using the code snippet
6377    for ac_prog in cp
6378do
6379  # Extract the first word of "$ac_prog", so it can be a program name with args.
6380set dummy $ac_prog; ac_word=$2
6381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6382$as_echo_n "checking for $ac_word... " >&6; }
6383if ${ac_cv_path_CP+:} false; then :
6384  $as_echo_n "(cached) " >&6
6385else
6386  case $CP in
6387  [\\/]* | ?:[\\/]*)
6388  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6389  ;;
6390  *)
6391  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6392for as_dir in $PATH
6393do
6394  IFS=$as_save_IFS
6395  test -z "$as_dir" && as_dir=.
6396    for ac_exec_ext in '' $ac_executable_extensions; do
6397  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6398    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6400    break 2
6401  fi
6402done
6403  done
6404IFS=$as_save_IFS
6405
6406  ;;
6407esac
6408fi
6409CP=$ac_cv_path_CP
6410if test -n "$CP"; then
6411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6412$as_echo "$CP" >&6; }
6413else
6414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6415$as_echo "no" >&6; }
6416fi
6417
6418
6419  test -n "$CP" && break
6420done
6421
6422  else
6423    # The variable is set, but is it from the command line or the environment?
6424
6425    # Try to remove the string !CP! from our list.
6426    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6427    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6428      # If it failed, the variable was not from the command line. Ignore it,
6429      # but warn the user (except for BASH, which is always set by the calling BASH).
6430      if test "xCP" != xBASH; then
6431        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6432$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6433      fi
6434      # Try to locate tool using the code snippet
6435      for ac_prog in cp
6436do
6437  # Extract the first word of "$ac_prog", so it can be a program name with args.
6438set dummy $ac_prog; ac_word=$2
6439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6440$as_echo_n "checking for $ac_word... " >&6; }
6441if ${ac_cv_path_CP+:} false; then :
6442  $as_echo_n "(cached) " >&6
6443else
6444  case $CP in
6445  [\\/]* | ?:[\\/]*)
6446  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6447  ;;
6448  *)
6449  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6450for as_dir in $PATH
6451do
6452  IFS=$as_save_IFS
6453  test -z "$as_dir" && as_dir=.
6454    for ac_exec_ext in '' $ac_executable_extensions; do
6455  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6456    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6457    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6458    break 2
6459  fi
6460done
6461  done
6462IFS=$as_save_IFS
6463
6464  ;;
6465esac
6466fi
6467CP=$ac_cv_path_CP
6468if test -n "$CP"; then
6469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6470$as_echo "$CP" >&6; }
6471else
6472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6473$as_echo "no" >&6; }
6474fi
6475
6476
6477  test -n "$CP" && break
6478done
6479
6480    else
6481      # If it succeeded, then it was overridden by the user. We will use it
6482      # for the tool.
6483
6484      # First remove it from the list of overridden variables, so we can test
6485      # for unknown variables in the end.
6486      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6487
6488      # Check if we try to supply an empty value
6489      if test "x$CP" = x; then
6490        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6491$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6492        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6493$as_echo_n "checking for CP... " >&6; }
6494        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6495$as_echo "disabled" >&6; }
6496      else
6497        # Check if the provided tool contains a complete path.
6498        tool_specified="$CP"
6499        tool_basename="${tool_specified##*/}"
6500        if test "x$tool_basename" = "x$tool_specified"; then
6501          # A command without a complete path is provided, search $PATH.
6502          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6503$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6504          # Extract the first word of "$tool_basename", so it can be a program name with args.
6505set dummy $tool_basename; ac_word=$2
6506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6507$as_echo_n "checking for $ac_word... " >&6; }
6508if ${ac_cv_path_CP+:} false; then :
6509  $as_echo_n "(cached) " >&6
6510else
6511  case $CP in
6512  [\\/]* | ?:[\\/]*)
6513  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6514  ;;
6515  *)
6516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6517for as_dir in $PATH
6518do
6519  IFS=$as_save_IFS
6520  test -z "$as_dir" && as_dir=.
6521    for ac_exec_ext in '' $ac_executable_extensions; do
6522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6523    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6525    break 2
6526  fi
6527done
6528  done
6529IFS=$as_save_IFS
6530
6531  ;;
6532esac
6533fi
6534CP=$ac_cv_path_CP
6535if test -n "$CP"; then
6536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6537$as_echo "$CP" >&6; }
6538else
6539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6540$as_echo "no" >&6; }
6541fi
6542
6543
6544          if test "x$CP" = x; then
6545            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6546          fi
6547        else
6548          # Otherwise we believe it is a complete path. Use it as it is.
6549          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6550$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6551          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6552$as_echo_n "checking for CP... " >&6; }
6553          if test ! -x "$tool_specified"; then
6554            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6555$as_echo "not found" >&6; }
6556            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6557          fi
6558          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6559$as_echo "$tool_specified" >&6; }
6560        fi
6561      fi
6562    fi
6563
6564  fi
6565
6566
6567
6568  if test "x$CP" = x; then
6569    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6570  fi
6571
6572
6573
6574
6575
6576  # Publish this variable in the help.
6577
6578
6579  if [ -z "${CUT+x}" ]; then
6580    # The variable is not set by user, try to locate tool using the code snippet
6581    for ac_prog in cut
6582do
6583  # Extract the first word of "$ac_prog", so it can be a program name with args.
6584set dummy $ac_prog; ac_word=$2
6585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6586$as_echo_n "checking for $ac_word... " >&6; }
6587if ${ac_cv_path_CUT+:} false; then :
6588  $as_echo_n "(cached) " >&6
6589else
6590  case $CUT in
6591  [\\/]* | ?:[\\/]*)
6592  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6593  ;;
6594  *)
6595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6596for as_dir in $PATH
6597do
6598  IFS=$as_save_IFS
6599  test -z "$as_dir" && as_dir=.
6600    for ac_exec_ext in '' $ac_executable_extensions; do
6601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6602    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6604    break 2
6605  fi
6606done
6607  done
6608IFS=$as_save_IFS
6609
6610  ;;
6611esac
6612fi
6613CUT=$ac_cv_path_CUT
6614if test -n "$CUT"; then
6615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6616$as_echo "$CUT" >&6; }
6617else
6618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6619$as_echo "no" >&6; }
6620fi
6621
6622
6623  test -n "$CUT" && break
6624done
6625
6626  else
6627    # The variable is set, but is it from the command line or the environment?
6628
6629    # Try to remove the string !CUT! from our list.
6630    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6631    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6632      # If it failed, the variable was not from the command line. Ignore it,
6633      # but warn the user (except for BASH, which is always set by the calling BASH).
6634      if test "xCUT" != xBASH; then
6635        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6636$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6637      fi
6638      # Try to locate tool using the code snippet
6639      for ac_prog in cut
6640do
6641  # Extract the first word of "$ac_prog", so it can be a program name with args.
6642set dummy $ac_prog; ac_word=$2
6643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6644$as_echo_n "checking for $ac_word... " >&6; }
6645if ${ac_cv_path_CUT+:} false; then :
6646  $as_echo_n "(cached) " >&6
6647else
6648  case $CUT in
6649  [\\/]* | ?:[\\/]*)
6650  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6651  ;;
6652  *)
6653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6654for as_dir in $PATH
6655do
6656  IFS=$as_save_IFS
6657  test -z "$as_dir" && as_dir=.
6658    for ac_exec_ext in '' $ac_executable_extensions; do
6659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6660    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6662    break 2
6663  fi
6664done
6665  done
6666IFS=$as_save_IFS
6667
6668  ;;
6669esac
6670fi
6671CUT=$ac_cv_path_CUT
6672if test -n "$CUT"; then
6673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6674$as_echo "$CUT" >&6; }
6675else
6676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6677$as_echo "no" >&6; }
6678fi
6679
6680
6681  test -n "$CUT" && break
6682done
6683
6684    else
6685      # If it succeeded, then it was overridden by the user. We will use it
6686      # for the tool.
6687
6688      # First remove it from the list of overridden variables, so we can test
6689      # for unknown variables in the end.
6690      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6691
6692      # Check if we try to supply an empty value
6693      if test "x$CUT" = x; then
6694        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6695$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6696        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6697$as_echo_n "checking for CUT... " >&6; }
6698        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6699$as_echo "disabled" >&6; }
6700      else
6701        # Check if the provided tool contains a complete path.
6702        tool_specified="$CUT"
6703        tool_basename="${tool_specified##*/}"
6704        if test "x$tool_basename" = "x$tool_specified"; then
6705          # A command without a complete path is provided, search $PATH.
6706          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6707$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6708          # Extract the first word of "$tool_basename", so it can be a program name with args.
6709set dummy $tool_basename; ac_word=$2
6710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6711$as_echo_n "checking for $ac_word... " >&6; }
6712if ${ac_cv_path_CUT+:} false; then :
6713  $as_echo_n "(cached) " >&6
6714else
6715  case $CUT in
6716  [\\/]* | ?:[\\/]*)
6717  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6718  ;;
6719  *)
6720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6721for as_dir in $PATH
6722do
6723  IFS=$as_save_IFS
6724  test -z "$as_dir" && as_dir=.
6725    for ac_exec_ext in '' $ac_executable_extensions; do
6726  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6727    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6729    break 2
6730  fi
6731done
6732  done
6733IFS=$as_save_IFS
6734
6735  ;;
6736esac
6737fi
6738CUT=$ac_cv_path_CUT
6739if test -n "$CUT"; then
6740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6741$as_echo "$CUT" >&6; }
6742else
6743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6744$as_echo "no" >&6; }
6745fi
6746
6747
6748          if test "x$CUT" = x; then
6749            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6750          fi
6751        else
6752          # Otherwise we believe it is a complete path. Use it as it is.
6753          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6754$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6755          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6756$as_echo_n "checking for CUT... " >&6; }
6757          if test ! -x "$tool_specified"; then
6758            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6759$as_echo "not found" >&6; }
6760            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6761          fi
6762          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6763$as_echo "$tool_specified" >&6; }
6764        fi
6765      fi
6766    fi
6767
6768  fi
6769
6770
6771
6772  if test "x$CUT" = x; then
6773    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6774  fi
6775
6776
6777
6778
6779
6780  # Publish this variable in the help.
6781
6782
6783  if [ -z "${DATE+x}" ]; then
6784    # The variable is not set by user, try to locate tool using the code snippet
6785    for ac_prog in date
6786do
6787  # Extract the first word of "$ac_prog", so it can be a program name with args.
6788set dummy $ac_prog; ac_word=$2
6789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6790$as_echo_n "checking for $ac_word... " >&6; }
6791if ${ac_cv_path_DATE+:} false; then :
6792  $as_echo_n "(cached) " >&6
6793else
6794  case $DATE in
6795  [\\/]* | ?:[\\/]*)
6796  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6797  ;;
6798  *)
6799  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6800for as_dir in $PATH
6801do
6802  IFS=$as_save_IFS
6803  test -z "$as_dir" && as_dir=.
6804    for ac_exec_ext in '' $ac_executable_extensions; do
6805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6806    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6808    break 2
6809  fi
6810done
6811  done
6812IFS=$as_save_IFS
6813
6814  ;;
6815esac
6816fi
6817DATE=$ac_cv_path_DATE
6818if test -n "$DATE"; then
6819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6820$as_echo "$DATE" >&6; }
6821else
6822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6823$as_echo "no" >&6; }
6824fi
6825
6826
6827  test -n "$DATE" && break
6828done
6829
6830  else
6831    # The variable is set, but is it from the command line or the environment?
6832
6833    # Try to remove the string !DATE! from our list.
6834    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6835    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6836      # If it failed, the variable was not from the command line. Ignore it,
6837      # but warn the user (except for BASH, which is always set by the calling BASH).
6838      if test "xDATE" != xBASH; then
6839        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6840$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6841      fi
6842      # Try to locate tool using the code snippet
6843      for ac_prog in date
6844do
6845  # Extract the first word of "$ac_prog", so it can be a program name with args.
6846set dummy $ac_prog; ac_word=$2
6847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6848$as_echo_n "checking for $ac_word... " >&6; }
6849if ${ac_cv_path_DATE+:} false; then :
6850  $as_echo_n "(cached) " >&6
6851else
6852  case $DATE in
6853  [\\/]* | ?:[\\/]*)
6854  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6855  ;;
6856  *)
6857  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6858for as_dir in $PATH
6859do
6860  IFS=$as_save_IFS
6861  test -z "$as_dir" && as_dir=.
6862    for ac_exec_ext in '' $ac_executable_extensions; do
6863  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6864    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6866    break 2
6867  fi
6868done
6869  done
6870IFS=$as_save_IFS
6871
6872  ;;
6873esac
6874fi
6875DATE=$ac_cv_path_DATE
6876if test -n "$DATE"; then
6877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6878$as_echo "$DATE" >&6; }
6879else
6880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6881$as_echo "no" >&6; }
6882fi
6883
6884
6885  test -n "$DATE" && break
6886done
6887
6888    else
6889      # If it succeeded, then it was overridden by the user. We will use it
6890      # for the tool.
6891
6892      # First remove it from the list of overridden variables, so we can test
6893      # for unknown variables in the end.
6894      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6895
6896      # Check if we try to supply an empty value
6897      if test "x$DATE" = x; then
6898        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6899$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6900        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6901$as_echo_n "checking for DATE... " >&6; }
6902        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6903$as_echo "disabled" >&6; }
6904      else
6905        # Check if the provided tool contains a complete path.
6906        tool_specified="$DATE"
6907        tool_basename="${tool_specified##*/}"
6908        if test "x$tool_basename" = "x$tool_specified"; then
6909          # A command without a complete path is provided, search $PATH.
6910          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6911$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6912          # Extract the first word of "$tool_basename", so it can be a program name with args.
6913set dummy $tool_basename; ac_word=$2
6914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6915$as_echo_n "checking for $ac_word... " >&6; }
6916if ${ac_cv_path_DATE+:} false; then :
6917  $as_echo_n "(cached) " >&6
6918else
6919  case $DATE in
6920  [\\/]* | ?:[\\/]*)
6921  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6922  ;;
6923  *)
6924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6925for as_dir in $PATH
6926do
6927  IFS=$as_save_IFS
6928  test -z "$as_dir" && as_dir=.
6929    for ac_exec_ext in '' $ac_executable_extensions; do
6930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6931    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6933    break 2
6934  fi
6935done
6936  done
6937IFS=$as_save_IFS
6938
6939  ;;
6940esac
6941fi
6942DATE=$ac_cv_path_DATE
6943if test -n "$DATE"; then
6944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6945$as_echo "$DATE" >&6; }
6946else
6947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6948$as_echo "no" >&6; }
6949fi
6950
6951
6952          if test "x$DATE" = x; then
6953            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6954          fi
6955        else
6956          # Otherwise we believe it is a complete path. Use it as it is.
6957          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6958$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6959          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6960$as_echo_n "checking for DATE... " >&6; }
6961          if test ! -x "$tool_specified"; then
6962            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6963$as_echo "not found" >&6; }
6964            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6965          fi
6966          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6967$as_echo "$tool_specified" >&6; }
6968        fi
6969      fi
6970    fi
6971
6972  fi
6973
6974
6975
6976  if test "x$DATE" = x; then
6977    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6978  fi
6979
6980
6981
6982
6983
6984  # Publish this variable in the help.
6985
6986
6987  if [ -z "${DIFF+x}" ]; then
6988    # The variable is not set by user, try to locate tool using the code snippet
6989    for ac_prog in gdiff diff
6990do
6991  # Extract the first word of "$ac_prog", so it can be a program name with args.
6992set dummy $ac_prog; ac_word=$2
6993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6994$as_echo_n "checking for $ac_word... " >&6; }
6995if ${ac_cv_path_DIFF+:} false; then :
6996  $as_echo_n "(cached) " >&6
6997else
6998  case $DIFF in
6999  [\\/]* | ?:[\\/]*)
7000  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7001  ;;
7002  *)
7003  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7004for as_dir in $PATH
7005do
7006  IFS=$as_save_IFS
7007  test -z "$as_dir" && as_dir=.
7008    for ac_exec_ext in '' $ac_executable_extensions; do
7009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7010    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7012    break 2
7013  fi
7014done
7015  done
7016IFS=$as_save_IFS
7017
7018  ;;
7019esac
7020fi
7021DIFF=$ac_cv_path_DIFF
7022if test -n "$DIFF"; then
7023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7024$as_echo "$DIFF" >&6; }
7025else
7026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7027$as_echo "no" >&6; }
7028fi
7029
7030
7031  test -n "$DIFF" && break
7032done
7033
7034  else
7035    # The variable is set, but is it from the command line or the environment?
7036
7037    # Try to remove the string !DIFF! from our list.
7038    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7039    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7040      # If it failed, the variable was not from the command line. Ignore it,
7041      # but warn the user (except for BASH, which is always set by the calling BASH).
7042      if test "xDIFF" != xBASH; then
7043        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7044$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7045      fi
7046      # Try to locate tool using the code snippet
7047      for ac_prog in gdiff diff
7048do
7049  # Extract the first word of "$ac_prog", so it can be a program name with args.
7050set dummy $ac_prog; ac_word=$2
7051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7052$as_echo_n "checking for $ac_word... " >&6; }
7053if ${ac_cv_path_DIFF+:} false; then :
7054  $as_echo_n "(cached) " >&6
7055else
7056  case $DIFF in
7057  [\\/]* | ?:[\\/]*)
7058  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7059  ;;
7060  *)
7061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7062for as_dir in $PATH
7063do
7064  IFS=$as_save_IFS
7065  test -z "$as_dir" && as_dir=.
7066    for ac_exec_ext in '' $ac_executable_extensions; do
7067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7068    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7070    break 2
7071  fi
7072done
7073  done
7074IFS=$as_save_IFS
7075
7076  ;;
7077esac
7078fi
7079DIFF=$ac_cv_path_DIFF
7080if test -n "$DIFF"; then
7081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7082$as_echo "$DIFF" >&6; }
7083else
7084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7085$as_echo "no" >&6; }
7086fi
7087
7088
7089  test -n "$DIFF" && break
7090done
7091
7092    else
7093      # If it succeeded, then it was overridden by the user. We will use it
7094      # for the tool.
7095
7096      # First remove it from the list of overridden variables, so we can test
7097      # for unknown variables in the end.
7098      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7099
7100      # Check if we try to supply an empty value
7101      if test "x$DIFF" = x; then
7102        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7103$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7104        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7105$as_echo_n "checking for DIFF... " >&6; }
7106        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7107$as_echo "disabled" >&6; }
7108      else
7109        # Check if the provided tool contains a complete path.
7110        tool_specified="$DIFF"
7111        tool_basename="${tool_specified##*/}"
7112        if test "x$tool_basename" = "x$tool_specified"; then
7113          # A command without a complete path is provided, search $PATH.
7114          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7115$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7116          # Extract the first word of "$tool_basename", so it can be a program name with args.
7117set dummy $tool_basename; ac_word=$2
7118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7119$as_echo_n "checking for $ac_word... " >&6; }
7120if ${ac_cv_path_DIFF+:} false; then :
7121  $as_echo_n "(cached) " >&6
7122else
7123  case $DIFF in
7124  [\\/]* | ?:[\\/]*)
7125  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7126  ;;
7127  *)
7128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7129for as_dir in $PATH
7130do
7131  IFS=$as_save_IFS
7132  test -z "$as_dir" && as_dir=.
7133    for ac_exec_ext in '' $ac_executable_extensions; do
7134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7135    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7137    break 2
7138  fi
7139done
7140  done
7141IFS=$as_save_IFS
7142
7143  ;;
7144esac
7145fi
7146DIFF=$ac_cv_path_DIFF
7147if test -n "$DIFF"; then
7148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7149$as_echo "$DIFF" >&6; }
7150else
7151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7152$as_echo "no" >&6; }
7153fi
7154
7155
7156          if test "x$DIFF" = x; then
7157            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7158          fi
7159        else
7160          # Otherwise we believe it is a complete path. Use it as it is.
7161          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7162$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7163          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7164$as_echo_n "checking for DIFF... " >&6; }
7165          if test ! -x "$tool_specified"; then
7166            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7167$as_echo "not found" >&6; }
7168            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7169          fi
7170          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7171$as_echo "$tool_specified" >&6; }
7172        fi
7173      fi
7174    fi
7175
7176  fi
7177
7178
7179
7180  if test "x$DIFF" = x; then
7181    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7182  fi
7183
7184
7185
7186
7187
7188  # Publish this variable in the help.
7189
7190
7191  if [ -z "${DIRNAME+x}" ]; then
7192    # The variable is not set by user, try to locate tool using the code snippet
7193    for ac_prog in dirname
7194do
7195  # Extract the first word of "$ac_prog", so it can be a program name with args.
7196set dummy $ac_prog; ac_word=$2
7197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7198$as_echo_n "checking for $ac_word... " >&6; }
7199if ${ac_cv_path_DIRNAME+:} false; then :
7200  $as_echo_n "(cached) " >&6
7201else
7202  case $DIRNAME in
7203  [\\/]* | ?:[\\/]*)
7204  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7205  ;;
7206  *)
7207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7208for as_dir in $PATH
7209do
7210  IFS=$as_save_IFS
7211  test -z "$as_dir" && as_dir=.
7212    for ac_exec_ext in '' $ac_executable_extensions; do
7213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7214    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7216    break 2
7217  fi
7218done
7219  done
7220IFS=$as_save_IFS
7221
7222  ;;
7223esac
7224fi
7225DIRNAME=$ac_cv_path_DIRNAME
7226if test -n "$DIRNAME"; then
7227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7228$as_echo "$DIRNAME" >&6; }
7229else
7230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7231$as_echo "no" >&6; }
7232fi
7233
7234
7235  test -n "$DIRNAME" && break
7236done
7237
7238  else
7239    # The variable is set, but is it from the command line or the environment?
7240
7241    # Try to remove the string !DIRNAME! from our list.
7242    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7243    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7244      # If it failed, the variable was not from the command line. Ignore it,
7245      # but warn the user (except for BASH, which is always set by the calling BASH).
7246      if test "xDIRNAME" != xBASH; then
7247        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7248$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7249      fi
7250      # Try to locate tool using the code snippet
7251      for ac_prog in dirname
7252do
7253  # Extract the first word of "$ac_prog", so it can be a program name with args.
7254set dummy $ac_prog; ac_word=$2
7255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7256$as_echo_n "checking for $ac_word... " >&6; }
7257if ${ac_cv_path_DIRNAME+:} false; then :
7258  $as_echo_n "(cached) " >&6
7259else
7260  case $DIRNAME in
7261  [\\/]* | ?:[\\/]*)
7262  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7263  ;;
7264  *)
7265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7266for as_dir in $PATH
7267do
7268  IFS=$as_save_IFS
7269  test -z "$as_dir" && as_dir=.
7270    for ac_exec_ext in '' $ac_executable_extensions; do
7271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7272    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7274    break 2
7275  fi
7276done
7277  done
7278IFS=$as_save_IFS
7279
7280  ;;
7281esac
7282fi
7283DIRNAME=$ac_cv_path_DIRNAME
7284if test -n "$DIRNAME"; then
7285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7286$as_echo "$DIRNAME" >&6; }
7287else
7288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7289$as_echo "no" >&6; }
7290fi
7291
7292
7293  test -n "$DIRNAME" && break
7294done
7295
7296    else
7297      # If it succeeded, then it was overridden by the user. We will use it
7298      # for the tool.
7299
7300      # First remove it from the list of overridden variables, so we can test
7301      # for unknown variables in the end.
7302      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7303
7304      # Check if we try to supply an empty value
7305      if test "x$DIRNAME" = x; then
7306        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7307$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7308        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7309$as_echo_n "checking for DIRNAME... " >&6; }
7310        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7311$as_echo "disabled" >&6; }
7312      else
7313        # Check if the provided tool contains a complete path.
7314        tool_specified="$DIRNAME"
7315        tool_basename="${tool_specified##*/}"
7316        if test "x$tool_basename" = "x$tool_specified"; then
7317          # A command without a complete path is provided, search $PATH.
7318          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7319$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7320          # Extract the first word of "$tool_basename", so it can be a program name with args.
7321set dummy $tool_basename; ac_word=$2
7322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7323$as_echo_n "checking for $ac_word... " >&6; }
7324if ${ac_cv_path_DIRNAME+:} false; then :
7325  $as_echo_n "(cached) " >&6
7326else
7327  case $DIRNAME in
7328  [\\/]* | ?:[\\/]*)
7329  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7330  ;;
7331  *)
7332  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7333for as_dir in $PATH
7334do
7335  IFS=$as_save_IFS
7336  test -z "$as_dir" && as_dir=.
7337    for ac_exec_ext in '' $ac_executable_extensions; do
7338  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7339    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7341    break 2
7342  fi
7343done
7344  done
7345IFS=$as_save_IFS
7346
7347  ;;
7348esac
7349fi
7350DIRNAME=$ac_cv_path_DIRNAME
7351if test -n "$DIRNAME"; then
7352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7353$as_echo "$DIRNAME" >&6; }
7354else
7355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7356$as_echo "no" >&6; }
7357fi
7358
7359
7360          if test "x$DIRNAME" = x; then
7361            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7362          fi
7363        else
7364          # Otherwise we believe it is a complete path. Use it as it is.
7365          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7366$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7367          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7368$as_echo_n "checking for DIRNAME... " >&6; }
7369          if test ! -x "$tool_specified"; then
7370            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7371$as_echo "not found" >&6; }
7372            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7373          fi
7374          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7375$as_echo "$tool_specified" >&6; }
7376        fi
7377      fi
7378    fi
7379
7380  fi
7381
7382
7383
7384  if test "x$DIRNAME" = x; then
7385    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7386  fi
7387
7388
7389
7390
7391
7392  # Publish this variable in the help.
7393
7394
7395  if [ -z "${ECHO+x}" ]; then
7396    # The variable is not set by user, try to locate tool using the code snippet
7397    for ac_prog in echo
7398do
7399  # Extract the first word of "$ac_prog", so it can be a program name with args.
7400set dummy $ac_prog; ac_word=$2
7401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7402$as_echo_n "checking for $ac_word... " >&6; }
7403if ${ac_cv_path_ECHO+:} false; then :
7404  $as_echo_n "(cached) " >&6
7405else
7406  case $ECHO in
7407  [\\/]* | ?:[\\/]*)
7408  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7409  ;;
7410  *)
7411  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7412for as_dir in $PATH
7413do
7414  IFS=$as_save_IFS
7415  test -z "$as_dir" && as_dir=.
7416    for ac_exec_ext in '' $ac_executable_extensions; do
7417  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7418    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7420    break 2
7421  fi
7422done
7423  done
7424IFS=$as_save_IFS
7425
7426  ;;
7427esac
7428fi
7429ECHO=$ac_cv_path_ECHO
7430if test -n "$ECHO"; then
7431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7432$as_echo "$ECHO" >&6; }
7433else
7434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7435$as_echo "no" >&6; }
7436fi
7437
7438
7439  test -n "$ECHO" && break
7440done
7441
7442  else
7443    # The variable is set, but is it from the command line or the environment?
7444
7445    # Try to remove the string !ECHO! from our list.
7446    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7447    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7448      # If it failed, the variable was not from the command line. Ignore it,
7449      # but warn the user (except for BASH, which is always set by the calling BASH).
7450      if test "xECHO" != xBASH; then
7451        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7452$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7453      fi
7454      # Try to locate tool using the code snippet
7455      for ac_prog in echo
7456do
7457  # Extract the first word of "$ac_prog", so it can be a program name with args.
7458set dummy $ac_prog; ac_word=$2
7459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7460$as_echo_n "checking for $ac_word... " >&6; }
7461if ${ac_cv_path_ECHO+:} false; then :
7462  $as_echo_n "(cached) " >&6
7463else
7464  case $ECHO in
7465  [\\/]* | ?:[\\/]*)
7466  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7467  ;;
7468  *)
7469  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7470for as_dir in $PATH
7471do
7472  IFS=$as_save_IFS
7473  test -z "$as_dir" && as_dir=.
7474    for ac_exec_ext in '' $ac_executable_extensions; do
7475  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7476    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7477    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7478    break 2
7479  fi
7480done
7481  done
7482IFS=$as_save_IFS
7483
7484  ;;
7485esac
7486fi
7487ECHO=$ac_cv_path_ECHO
7488if test -n "$ECHO"; then
7489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7490$as_echo "$ECHO" >&6; }
7491else
7492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7493$as_echo "no" >&6; }
7494fi
7495
7496
7497  test -n "$ECHO" && break
7498done
7499
7500    else
7501      # If it succeeded, then it was overridden by the user. We will use it
7502      # for the tool.
7503
7504      # First remove it from the list of overridden variables, so we can test
7505      # for unknown variables in the end.
7506      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7507
7508      # Check if we try to supply an empty value
7509      if test "x$ECHO" = x; then
7510        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7511$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7512        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7513$as_echo_n "checking for ECHO... " >&6; }
7514        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7515$as_echo "disabled" >&6; }
7516      else
7517        # Check if the provided tool contains a complete path.
7518        tool_specified="$ECHO"
7519        tool_basename="${tool_specified##*/}"
7520        if test "x$tool_basename" = "x$tool_specified"; then
7521          # A command without a complete path is provided, search $PATH.
7522          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7523$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7524          # Extract the first word of "$tool_basename", so it can be a program name with args.
7525set dummy $tool_basename; ac_word=$2
7526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7527$as_echo_n "checking for $ac_word... " >&6; }
7528if ${ac_cv_path_ECHO+:} false; then :
7529  $as_echo_n "(cached) " >&6
7530else
7531  case $ECHO in
7532  [\\/]* | ?:[\\/]*)
7533  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7534  ;;
7535  *)
7536  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7537for as_dir in $PATH
7538do
7539  IFS=$as_save_IFS
7540  test -z "$as_dir" && as_dir=.
7541    for ac_exec_ext in '' $ac_executable_extensions; do
7542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7543    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7545    break 2
7546  fi
7547done
7548  done
7549IFS=$as_save_IFS
7550
7551  ;;
7552esac
7553fi
7554ECHO=$ac_cv_path_ECHO
7555if test -n "$ECHO"; then
7556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7557$as_echo "$ECHO" >&6; }
7558else
7559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7560$as_echo "no" >&6; }
7561fi
7562
7563
7564          if test "x$ECHO" = x; then
7565            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7566          fi
7567        else
7568          # Otherwise we believe it is a complete path. Use it as it is.
7569          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7570$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7571          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7572$as_echo_n "checking for ECHO... " >&6; }
7573          if test ! -x "$tool_specified"; then
7574            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7575$as_echo "not found" >&6; }
7576            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7577          fi
7578          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7579$as_echo "$tool_specified" >&6; }
7580        fi
7581      fi
7582    fi
7583
7584  fi
7585
7586
7587
7588  if test "x$ECHO" = x; then
7589    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7590  fi
7591
7592
7593
7594
7595
7596  # Publish this variable in the help.
7597
7598
7599  if [ -z "${EXPR+x}" ]; then
7600    # The variable is not set by user, try to locate tool using the code snippet
7601    for ac_prog in expr
7602do
7603  # Extract the first word of "$ac_prog", so it can be a program name with args.
7604set dummy $ac_prog; ac_word=$2
7605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7606$as_echo_n "checking for $ac_word... " >&6; }
7607if ${ac_cv_path_EXPR+:} false; then :
7608  $as_echo_n "(cached) " >&6
7609else
7610  case $EXPR in
7611  [\\/]* | ?:[\\/]*)
7612  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7613  ;;
7614  *)
7615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7616for as_dir in $PATH
7617do
7618  IFS=$as_save_IFS
7619  test -z "$as_dir" && as_dir=.
7620    for ac_exec_ext in '' $ac_executable_extensions; do
7621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7622    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7624    break 2
7625  fi
7626done
7627  done
7628IFS=$as_save_IFS
7629
7630  ;;
7631esac
7632fi
7633EXPR=$ac_cv_path_EXPR
7634if test -n "$EXPR"; then
7635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7636$as_echo "$EXPR" >&6; }
7637else
7638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7639$as_echo "no" >&6; }
7640fi
7641
7642
7643  test -n "$EXPR" && break
7644done
7645
7646  else
7647    # The variable is set, but is it from the command line or the environment?
7648
7649    # Try to remove the string !EXPR! from our list.
7650    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7651    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7652      # If it failed, the variable was not from the command line. Ignore it,
7653      # but warn the user (except for BASH, which is always set by the calling BASH).
7654      if test "xEXPR" != xBASH; then
7655        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7656$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7657      fi
7658      # Try to locate tool using the code snippet
7659      for ac_prog in expr
7660do
7661  # Extract the first word of "$ac_prog", so it can be a program name with args.
7662set dummy $ac_prog; ac_word=$2
7663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7664$as_echo_n "checking for $ac_word... " >&6; }
7665if ${ac_cv_path_EXPR+:} false; then :
7666  $as_echo_n "(cached) " >&6
7667else
7668  case $EXPR in
7669  [\\/]* | ?:[\\/]*)
7670  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7671  ;;
7672  *)
7673  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7674for as_dir in $PATH
7675do
7676  IFS=$as_save_IFS
7677  test -z "$as_dir" && as_dir=.
7678    for ac_exec_ext in '' $ac_executable_extensions; do
7679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7680    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7682    break 2
7683  fi
7684done
7685  done
7686IFS=$as_save_IFS
7687
7688  ;;
7689esac
7690fi
7691EXPR=$ac_cv_path_EXPR
7692if test -n "$EXPR"; then
7693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7694$as_echo "$EXPR" >&6; }
7695else
7696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7697$as_echo "no" >&6; }
7698fi
7699
7700
7701  test -n "$EXPR" && break
7702done
7703
7704    else
7705      # If it succeeded, then it was overridden by the user. We will use it
7706      # for the tool.
7707
7708      # First remove it from the list of overridden variables, so we can test
7709      # for unknown variables in the end.
7710      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7711
7712      # Check if we try to supply an empty value
7713      if test "x$EXPR" = x; then
7714        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7715$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7716        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7717$as_echo_n "checking for EXPR... " >&6; }
7718        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7719$as_echo "disabled" >&6; }
7720      else
7721        # Check if the provided tool contains a complete path.
7722        tool_specified="$EXPR"
7723        tool_basename="${tool_specified##*/}"
7724        if test "x$tool_basename" = "x$tool_specified"; then
7725          # A command without a complete path is provided, search $PATH.
7726          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7727$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7728          # Extract the first word of "$tool_basename", so it can be a program name with args.
7729set dummy $tool_basename; ac_word=$2
7730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7731$as_echo_n "checking for $ac_word... " >&6; }
7732if ${ac_cv_path_EXPR+:} false; then :
7733  $as_echo_n "(cached) " >&6
7734else
7735  case $EXPR in
7736  [\\/]* | ?:[\\/]*)
7737  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7738  ;;
7739  *)
7740  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7741for as_dir in $PATH
7742do
7743  IFS=$as_save_IFS
7744  test -z "$as_dir" && as_dir=.
7745    for ac_exec_ext in '' $ac_executable_extensions; do
7746  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7747    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7749    break 2
7750  fi
7751done
7752  done
7753IFS=$as_save_IFS
7754
7755  ;;
7756esac
7757fi
7758EXPR=$ac_cv_path_EXPR
7759if test -n "$EXPR"; then
7760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7761$as_echo "$EXPR" >&6; }
7762else
7763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7764$as_echo "no" >&6; }
7765fi
7766
7767
7768          if test "x$EXPR" = x; then
7769            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7770          fi
7771        else
7772          # Otherwise we believe it is a complete path. Use it as it is.
7773          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7774$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7775          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7776$as_echo_n "checking for EXPR... " >&6; }
7777          if test ! -x "$tool_specified"; then
7778            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7779$as_echo "not found" >&6; }
7780            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7781          fi
7782          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7783$as_echo "$tool_specified" >&6; }
7784        fi
7785      fi
7786    fi
7787
7788  fi
7789
7790
7791
7792  if test "x$EXPR" = x; then
7793    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7794  fi
7795
7796
7797
7798
7799
7800  # Publish this variable in the help.
7801
7802
7803  if [ -z "${FILE+x}" ]; then
7804    # The variable is not set by user, try to locate tool using the code snippet
7805    for ac_prog in file
7806do
7807  # Extract the first word of "$ac_prog", so it can be a program name with args.
7808set dummy $ac_prog; ac_word=$2
7809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7810$as_echo_n "checking for $ac_word... " >&6; }
7811if ${ac_cv_path_FILE+:} false; then :
7812  $as_echo_n "(cached) " >&6
7813else
7814  case $FILE in
7815  [\\/]* | ?:[\\/]*)
7816  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7817  ;;
7818  *)
7819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7820for as_dir in $PATH
7821do
7822  IFS=$as_save_IFS
7823  test -z "$as_dir" && as_dir=.
7824    for ac_exec_ext in '' $ac_executable_extensions; do
7825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7826    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7828    break 2
7829  fi
7830done
7831  done
7832IFS=$as_save_IFS
7833
7834  ;;
7835esac
7836fi
7837FILE=$ac_cv_path_FILE
7838if test -n "$FILE"; then
7839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7840$as_echo "$FILE" >&6; }
7841else
7842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7843$as_echo "no" >&6; }
7844fi
7845
7846
7847  test -n "$FILE" && break
7848done
7849
7850  else
7851    # The variable is set, but is it from the command line or the environment?
7852
7853    # Try to remove the string !FILE! from our list.
7854    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7855    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7856      # If it failed, the variable was not from the command line. Ignore it,
7857      # but warn the user (except for BASH, which is always set by the calling BASH).
7858      if test "xFILE" != xBASH; then
7859        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7860$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7861      fi
7862      # Try to locate tool using the code snippet
7863      for ac_prog in file
7864do
7865  # Extract the first word of "$ac_prog", so it can be a program name with args.
7866set dummy $ac_prog; ac_word=$2
7867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7868$as_echo_n "checking for $ac_word... " >&6; }
7869if ${ac_cv_path_FILE+:} false; then :
7870  $as_echo_n "(cached) " >&6
7871else
7872  case $FILE in
7873  [\\/]* | ?:[\\/]*)
7874  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7875  ;;
7876  *)
7877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7878for as_dir in $PATH
7879do
7880  IFS=$as_save_IFS
7881  test -z "$as_dir" && as_dir=.
7882    for ac_exec_ext in '' $ac_executable_extensions; do
7883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7884    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7886    break 2
7887  fi
7888done
7889  done
7890IFS=$as_save_IFS
7891
7892  ;;
7893esac
7894fi
7895FILE=$ac_cv_path_FILE
7896if test -n "$FILE"; then
7897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7898$as_echo "$FILE" >&6; }
7899else
7900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7901$as_echo "no" >&6; }
7902fi
7903
7904
7905  test -n "$FILE" && break
7906done
7907
7908    else
7909      # If it succeeded, then it was overridden by the user. We will use it
7910      # for the tool.
7911
7912      # First remove it from the list of overridden variables, so we can test
7913      # for unknown variables in the end.
7914      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7915
7916      # Check if we try to supply an empty value
7917      if test "x$FILE" = x; then
7918        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7919$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7920        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7921$as_echo_n "checking for FILE... " >&6; }
7922        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7923$as_echo "disabled" >&6; }
7924      else
7925        # Check if the provided tool contains a complete path.
7926        tool_specified="$FILE"
7927        tool_basename="${tool_specified##*/}"
7928        if test "x$tool_basename" = "x$tool_specified"; then
7929          # A command without a complete path is provided, search $PATH.
7930          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7931$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7932          # Extract the first word of "$tool_basename", so it can be a program name with args.
7933set dummy $tool_basename; ac_word=$2
7934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7935$as_echo_n "checking for $ac_word... " >&6; }
7936if ${ac_cv_path_FILE+:} false; then :
7937  $as_echo_n "(cached) " >&6
7938else
7939  case $FILE in
7940  [\\/]* | ?:[\\/]*)
7941  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7942  ;;
7943  *)
7944  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7945for as_dir in $PATH
7946do
7947  IFS=$as_save_IFS
7948  test -z "$as_dir" && as_dir=.
7949    for ac_exec_ext in '' $ac_executable_extensions; do
7950  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7951    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7952    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7953    break 2
7954  fi
7955done
7956  done
7957IFS=$as_save_IFS
7958
7959  ;;
7960esac
7961fi
7962FILE=$ac_cv_path_FILE
7963if test -n "$FILE"; then
7964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7965$as_echo "$FILE" >&6; }
7966else
7967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7968$as_echo "no" >&6; }
7969fi
7970
7971
7972          if test "x$FILE" = x; then
7973            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7974          fi
7975        else
7976          # Otherwise we believe it is a complete path. Use it as it is.
7977          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7978$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7979          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7980$as_echo_n "checking for FILE... " >&6; }
7981          if test ! -x "$tool_specified"; then
7982            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7983$as_echo "not found" >&6; }
7984            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7985          fi
7986          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7987$as_echo "$tool_specified" >&6; }
7988        fi
7989      fi
7990    fi
7991
7992  fi
7993
7994
7995
7996  if test "x$FILE" = x; then
7997    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7998  fi
7999
8000
8001
8002
8003
8004  # Publish this variable in the help.
8005
8006
8007  if [ -z "${FIND+x}" ]; then
8008    # The variable is not set by user, try to locate tool using the code snippet
8009    for ac_prog in find
8010do
8011  # Extract the first word of "$ac_prog", so it can be a program name with args.
8012set dummy $ac_prog; ac_word=$2
8013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8014$as_echo_n "checking for $ac_word... " >&6; }
8015if ${ac_cv_path_FIND+:} false; then :
8016  $as_echo_n "(cached) " >&6
8017else
8018  case $FIND in
8019  [\\/]* | ?:[\\/]*)
8020  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8021  ;;
8022  *)
8023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8024for as_dir in $PATH
8025do
8026  IFS=$as_save_IFS
8027  test -z "$as_dir" && as_dir=.
8028    for ac_exec_ext in '' $ac_executable_extensions; do
8029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8030    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8032    break 2
8033  fi
8034done
8035  done
8036IFS=$as_save_IFS
8037
8038  ;;
8039esac
8040fi
8041FIND=$ac_cv_path_FIND
8042if test -n "$FIND"; then
8043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8044$as_echo "$FIND" >&6; }
8045else
8046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8047$as_echo "no" >&6; }
8048fi
8049
8050
8051  test -n "$FIND" && break
8052done
8053
8054  else
8055    # The variable is set, but is it from the command line or the environment?
8056
8057    # Try to remove the string !FIND! from our list.
8058    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8059    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8060      # If it failed, the variable was not from the command line. Ignore it,
8061      # but warn the user (except for BASH, which is always set by the calling BASH).
8062      if test "xFIND" != xBASH; then
8063        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8064$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8065      fi
8066      # Try to locate tool using the code snippet
8067      for ac_prog in find
8068do
8069  # Extract the first word of "$ac_prog", so it can be a program name with args.
8070set dummy $ac_prog; ac_word=$2
8071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8072$as_echo_n "checking for $ac_word... " >&6; }
8073if ${ac_cv_path_FIND+:} false; then :
8074  $as_echo_n "(cached) " >&6
8075else
8076  case $FIND in
8077  [\\/]* | ?:[\\/]*)
8078  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8079  ;;
8080  *)
8081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8082for as_dir in $PATH
8083do
8084  IFS=$as_save_IFS
8085  test -z "$as_dir" && as_dir=.
8086    for ac_exec_ext in '' $ac_executable_extensions; do
8087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8088    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8090    break 2
8091  fi
8092done
8093  done
8094IFS=$as_save_IFS
8095
8096  ;;
8097esac
8098fi
8099FIND=$ac_cv_path_FIND
8100if test -n "$FIND"; then
8101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8102$as_echo "$FIND" >&6; }
8103else
8104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8105$as_echo "no" >&6; }
8106fi
8107
8108
8109  test -n "$FIND" && break
8110done
8111
8112    else
8113      # If it succeeded, then it was overridden by the user. We will use it
8114      # for the tool.
8115
8116      # First remove it from the list of overridden variables, so we can test
8117      # for unknown variables in the end.
8118      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8119
8120      # Check if we try to supply an empty value
8121      if test "x$FIND" = x; then
8122        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8123$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8124        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8125$as_echo_n "checking for FIND... " >&6; }
8126        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8127$as_echo "disabled" >&6; }
8128      else
8129        # Check if the provided tool contains a complete path.
8130        tool_specified="$FIND"
8131        tool_basename="${tool_specified##*/}"
8132        if test "x$tool_basename" = "x$tool_specified"; then
8133          # A command without a complete path is provided, search $PATH.
8134          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8135$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8136          # Extract the first word of "$tool_basename", so it can be a program name with args.
8137set dummy $tool_basename; ac_word=$2
8138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8139$as_echo_n "checking for $ac_word... " >&6; }
8140if ${ac_cv_path_FIND+:} false; then :
8141  $as_echo_n "(cached) " >&6
8142else
8143  case $FIND in
8144  [\\/]* | ?:[\\/]*)
8145  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8146  ;;
8147  *)
8148  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8149for as_dir in $PATH
8150do
8151  IFS=$as_save_IFS
8152  test -z "$as_dir" && as_dir=.
8153    for ac_exec_ext in '' $ac_executable_extensions; do
8154  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8155    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8156    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8157    break 2
8158  fi
8159done
8160  done
8161IFS=$as_save_IFS
8162
8163  ;;
8164esac
8165fi
8166FIND=$ac_cv_path_FIND
8167if test -n "$FIND"; then
8168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8169$as_echo "$FIND" >&6; }
8170else
8171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8172$as_echo "no" >&6; }
8173fi
8174
8175
8176          if test "x$FIND" = x; then
8177            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8178          fi
8179        else
8180          # Otherwise we believe it is a complete path. Use it as it is.
8181          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8182$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8183          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8184$as_echo_n "checking for FIND... " >&6; }
8185          if test ! -x "$tool_specified"; then
8186            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8187$as_echo "not found" >&6; }
8188            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8189          fi
8190          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8191$as_echo "$tool_specified" >&6; }
8192        fi
8193      fi
8194    fi
8195
8196  fi
8197
8198
8199
8200  if test "x$FIND" = x; then
8201    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8202  fi
8203
8204
8205
8206
8207
8208  # Publish this variable in the help.
8209
8210
8211  if [ -z "${HEAD+x}" ]; then
8212    # The variable is not set by user, try to locate tool using the code snippet
8213    for ac_prog in head
8214do
8215  # Extract the first word of "$ac_prog", so it can be a program name with args.
8216set dummy $ac_prog; ac_word=$2
8217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8218$as_echo_n "checking for $ac_word... " >&6; }
8219if ${ac_cv_path_HEAD+:} false; then :
8220  $as_echo_n "(cached) " >&6
8221else
8222  case $HEAD in
8223  [\\/]* | ?:[\\/]*)
8224  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8225  ;;
8226  *)
8227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8228for as_dir in $PATH
8229do
8230  IFS=$as_save_IFS
8231  test -z "$as_dir" && as_dir=.
8232    for ac_exec_ext in '' $ac_executable_extensions; do
8233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8234    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8236    break 2
8237  fi
8238done
8239  done
8240IFS=$as_save_IFS
8241
8242  ;;
8243esac
8244fi
8245HEAD=$ac_cv_path_HEAD
8246if test -n "$HEAD"; then
8247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8248$as_echo "$HEAD" >&6; }
8249else
8250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8251$as_echo "no" >&6; }
8252fi
8253
8254
8255  test -n "$HEAD" && break
8256done
8257
8258  else
8259    # The variable is set, but is it from the command line or the environment?
8260
8261    # Try to remove the string !HEAD! from our list.
8262    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8263    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8264      # If it failed, the variable was not from the command line. Ignore it,
8265      # but warn the user (except for BASH, which is always set by the calling BASH).
8266      if test "xHEAD" != xBASH; then
8267        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8268$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8269      fi
8270      # Try to locate tool using the code snippet
8271      for ac_prog in head
8272do
8273  # Extract the first word of "$ac_prog", so it can be a program name with args.
8274set dummy $ac_prog; ac_word=$2
8275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8276$as_echo_n "checking for $ac_word... " >&6; }
8277if ${ac_cv_path_HEAD+:} false; then :
8278  $as_echo_n "(cached) " >&6
8279else
8280  case $HEAD in
8281  [\\/]* | ?:[\\/]*)
8282  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8283  ;;
8284  *)
8285  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8286for as_dir in $PATH
8287do
8288  IFS=$as_save_IFS
8289  test -z "$as_dir" && as_dir=.
8290    for ac_exec_ext in '' $ac_executable_extensions; do
8291  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8292    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8294    break 2
8295  fi
8296done
8297  done
8298IFS=$as_save_IFS
8299
8300  ;;
8301esac
8302fi
8303HEAD=$ac_cv_path_HEAD
8304if test -n "$HEAD"; then
8305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8306$as_echo "$HEAD" >&6; }
8307else
8308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8309$as_echo "no" >&6; }
8310fi
8311
8312
8313  test -n "$HEAD" && break
8314done
8315
8316    else
8317      # If it succeeded, then it was overridden by the user. We will use it
8318      # for the tool.
8319
8320      # First remove it from the list of overridden variables, so we can test
8321      # for unknown variables in the end.
8322      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8323
8324      # Check if we try to supply an empty value
8325      if test "x$HEAD" = x; then
8326        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8327$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8328        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8329$as_echo_n "checking for HEAD... " >&6; }
8330        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8331$as_echo "disabled" >&6; }
8332      else
8333        # Check if the provided tool contains a complete path.
8334        tool_specified="$HEAD"
8335        tool_basename="${tool_specified##*/}"
8336        if test "x$tool_basename" = "x$tool_specified"; then
8337          # A command without a complete path is provided, search $PATH.
8338          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8339$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8340          # Extract the first word of "$tool_basename", so it can be a program name with args.
8341set dummy $tool_basename; ac_word=$2
8342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8343$as_echo_n "checking for $ac_word... " >&6; }
8344if ${ac_cv_path_HEAD+:} false; then :
8345  $as_echo_n "(cached) " >&6
8346else
8347  case $HEAD in
8348  [\\/]* | ?:[\\/]*)
8349  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8350  ;;
8351  *)
8352  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8353for as_dir in $PATH
8354do
8355  IFS=$as_save_IFS
8356  test -z "$as_dir" && as_dir=.
8357    for ac_exec_ext in '' $ac_executable_extensions; do
8358  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8359    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8360    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8361    break 2
8362  fi
8363done
8364  done
8365IFS=$as_save_IFS
8366
8367  ;;
8368esac
8369fi
8370HEAD=$ac_cv_path_HEAD
8371if test -n "$HEAD"; then
8372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8373$as_echo "$HEAD" >&6; }
8374else
8375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8376$as_echo "no" >&6; }
8377fi
8378
8379
8380          if test "x$HEAD" = x; then
8381            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8382          fi
8383        else
8384          # Otherwise we believe it is a complete path. Use it as it is.
8385          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8386$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8387          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8388$as_echo_n "checking for HEAD... " >&6; }
8389          if test ! -x "$tool_specified"; then
8390            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8391$as_echo "not found" >&6; }
8392            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8393          fi
8394          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8395$as_echo "$tool_specified" >&6; }
8396        fi
8397      fi
8398    fi
8399
8400  fi
8401
8402
8403
8404  if test "x$HEAD" = x; then
8405    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8406  fi
8407
8408
8409
8410
8411
8412  # Publish this variable in the help.
8413
8414
8415  if [ -z "${GUNZIP+x}" ]; then
8416    # The variable is not set by user, try to locate tool using the code snippet
8417    for ac_prog in gunzip
8418do
8419  # Extract the first word of "$ac_prog", so it can be a program name with args.
8420set dummy $ac_prog; ac_word=$2
8421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8422$as_echo_n "checking for $ac_word... " >&6; }
8423if ${ac_cv_path_GUNZIP+:} false; then :
8424  $as_echo_n "(cached) " >&6
8425else
8426  case $GUNZIP in
8427  [\\/]* | ?:[\\/]*)
8428  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8429  ;;
8430  *)
8431  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8432for as_dir in $PATH
8433do
8434  IFS=$as_save_IFS
8435  test -z "$as_dir" && as_dir=.
8436    for ac_exec_ext in '' $ac_executable_extensions; do
8437  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8438    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8439    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8440    break 2
8441  fi
8442done
8443  done
8444IFS=$as_save_IFS
8445
8446  ;;
8447esac
8448fi
8449GUNZIP=$ac_cv_path_GUNZIP
8450if test -n "$GUNZIP"; then
8451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8452$as_echo "$GUNZIP" >&6; }
8453else
8454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8455$as_echo "no" >&6; }
8456fi
8457
8458
8459  test -n "$GUNZIP" && break
8460done
8461
8462  else
8463    # The variable is set, but is it from the command line or the environment?
8464
8465    # Try to remove the string !GUNZIP! from our list.
8466    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8467    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8468      # If it failed, the variable was not from the command line. Ignore it,
8469      # but warn the user (except for BASH, which is always set by the calling BASH).
8470      if test "xGUNZIP" != xBASH; then
8471        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8472$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8473      fi
8474      # Try to locate tool using the code snippet
8475      for ac_prog in gunzip
8476do
8477  # Extract the first word of "$ac_prog", so it can be a program name with args.
8478set dummy $ac_prog; ac_word=$2
8479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8480$as_echo_n "checking for $ac_word... " >&6; }
8481if ${ac_cv_path_GUNZIP+:} false; then :
8482  $as_echo_n "(cached) " >&6
8483else
8484  case $GUNZIP in
8485  [\\/]* | ?:[\\/]*)
8486  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8487  ;;
8488  *)
8489  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8490for as_dir in $PATH
8491do
8492  IFS=$as_save_IFS
8493  test -z "$as_dir" && as_dir=.
8494    for ac_exec_ext in '' $ac_executable_extensions; do
8495  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8496    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8497    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8498    break 2
8499  fi
8500done
8501  done
8502IFS=$as_save_IFS
8503
8504  ;;
8505esac
8506fi
8507GUNZIP=$ac_cv_path_GUNZIP
8508if test -n "$GUNZIP"; then
8509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8510$as_echo "$GUNZIP" >&6; }
8511else
8512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8513$as_echo "no" >&6; }
8514fi
8515
8516
8517  test -n "$GUNZIP" && break
8518done
8519
8520    else
8521      # If it succeeded, then it was overridden by the user. We will use it
8522      # for the tool.
8523
8524      # First remove it from the list of overridden variables, so we can test
8525      # for unknown variables in the end.
8526      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8527
8528      # Check if we try to supply an empty value
8529      if test "x$GUNZIP" = x; then
8530        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8531$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8532        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8533$as_echo_n "checking for GUNZIP... " >&6; }
8534        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8535$as_echo "disabled" >&6; }
8536      else
8537        # Check if the provided tool contains a complete path.
8538        tool_specified="$GUNZIP"
8539        tool_basename="${tool_specified##*/}"
8540        if test "x$tool_basename" = "x$tool_specified"; then
8541          # A command without a complete path is provided, search $PATH.
8542          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8543$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8544          # Extract the first word of "$tool_basename", so it can be a program name with args.
8545set dummy $tool_basename; ac_word=$2
8546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8547$as_echo_n "checking for $ac_word... " >&6; }
8548if ${ac_cv_path_GUNZIP+:} false; then :
8549  $as_echo_n "(cached) " >&6
8550else
8551  case $GUNZIP in
8552  [\\/]* | ?:[\\/]*)
8553  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8554  ;;
8555  *)
8556  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8557for as_dir in $PATH
8558do
8559  IFS=$as_save_IFS
8560  test -z "$as_dir" && as_dir=.
8561    for ac_exec_ext in '' $ac_executable_extensions; do
8562  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8563    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8564    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8565    break 2
8566  fi
8567done
8568  done
8569IFS=$as_save_IFS
8570
8571  ;;
8572esac
8573fi
8574GUNZIP=$ac_cv_path_GUNZIP
8575if test -n "$GUNZIP"; then
8576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8577$as_echo "$GUNZIP" >&6; }
8578else
8579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8580$as_echo "no" >&6; }
8581fi
8582
8583
8584          if test "x$GUNZIP" = x; then
8585            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8586          fi
8587        else
8588          # Otherwise we believe it is a complete path. Use it as it is.
8589          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8590$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8591          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8592$as_echo_n "checking for GUNZIP... " >&6; }
8593          if test ! -x "$tool_specified"; then
8594            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8595$as_echo "not found" >&6; }
8596            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8597          fi
8598          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8599$as_echo "$tool_specified" >&6; }
8600        fi
8601      fi
8602    fi
8603
8604  fi
8605
8606
8607
8608  if test "x$GUNZIP" = x; then
8609    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8610  fi
8611
8612
8613
8614
8615
8616  # Publish this variable in the help.
8617
8618
8619  if [ -z "${GZIP+x}" ]; then
8620    # The variable is not set by user, try to locate tool using the code snippet
8621    for ac_prog in pigz gzip
8622do
8623  # Extract the first word of "$ac_prog", so it can be a program name with args.
8624set dummy $ac_prog; ac_word=$2
8625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8626$as_echo_n "checking for $ac_word... " >&6; }
8627if ${ac_cv_path_GZIP+:} false; then :
8628  $as_echo_n "(cached) " >&6
8629else
8630  case $GZIP in
8631  [\\/]* | ?:[\\/]*)
8632  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8633  ;;
8634  *)
8635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8636for as_dir in $PATH
8637do
8638  IFS=$as_save_IFS
8639  test -z "$as_dir" && as_dir=.
8640    for ac_exec_ext in '' $ac_executable_extensions; do
8641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8642    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8644    break 2
8645  fi
8646done
8647  done
8648IFS=$as_save_IFS
8649
8650  ;;
8651esac
8652fi
8653GZIP=$ac_cv_path_GZIP
8654if test -n "$GZIP"; then
8655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8656$as_echo "$GZIP" >&6; }
8657else
8658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8659$as_echo "no" >&6; }
8660fi
8661
8662
8663  test -n "$GZIP" && break
8664done
8665
8666  else
8667    # The variable is set, but is it from the command line or the environment?
8668
8669    # Try to remove the string !GZIP! from our list.
8670    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8671    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8672      # If it failed, the variable was not from the command line. Ignore it,
8673      # but warn the user (except for BASH, which is always set by the calling BASH).
8674      if test "xGZIP" != xBASH; then
8675        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8676$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8677      fi
8678      # Try to locate tool using the code snippet
8679      for ac_prog in pigz gzip
8680do
8681  # Extract the first word of "$ac_prog", so it can be a program name with args.
8682set dummy $ac_prog; ac_word=$2
8683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8684$as_echo_n "checking for $ac_word... " >&6; }
8685if ${ac_cv_path_GZIP+:} false; then :
8686  $as_echo_n "(cached) " >&6
8687else
8688  case $GZIP in
8689  [\\/]* | ?:[\\/]*)
8690  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8691  ;;
8692  *)
8693  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8694for as_dir in $PATH
8695do
8696  IFS=$as_save_IFS
8697  test -z "$as_dir" && as_dir=.
8698    for ac_exec_ext in '' $ac_executable_extensions; do
8699  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8700    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8702    break 2
8703  fi
8704done
8705  done
8706IFS=$as_save_IFS
8707
8708  ;;
8709esac
8710fi
8711GZIP=$ac_cv_path_GZIP
8712if test -n "$GZIP"; then
8713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8714$as_echo "$GZIP" >&6; }
8715else
8716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8717$as_echo "no" >&6; }
8718fi
8719
8720
8721  test -n "$GZIP" && break
8722done
8723
8724    else
8725      # If it succeeded, then it was overridden by the user. We will use it
8726      # for the tool.
8727
8728      # First remove it from the list of overridden variables, so we can test
8729      # for unknown variables in the end.
8730      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8731
8732      # Check if we try to supply an empty value
8733      if test "x$GZIP" = x; then
8734        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8735$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8736        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8737$as_echo_n "checking for GZIP... " >&6; }
8738        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8739$as_echo "disabled" >&6; }
8740      else
8741        # Check if the provided tool contains a complete path.
8742        tool_specified="$GZIP"
8743        tool_basename="${tool_specified##*/}"
8744        if test "x$tool_basename" = "x$tool_specified"; then
8745          # A command without a complete path is provided, search $PATH.
8746          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8747$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8748          # Extract the first word of "$tool_basename", so it can be a program name with args.
8749set dummy $tool_basename; ac_word=$2
8750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8751$as_echo_n "checking for $ac_word... " >&6; }
8752if ${ac_cv_path_GZIP+:} false; then :
8753  $as_echo_n "(cached) " >&6
8754else
8755  case $GZIP in
8756  [\\/]* | ?:[\\/]*)
8757  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8758  ;;
8759  *)
8760  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8761for as_dir in $PATH
8762do
8763  IFS=$as_save_IFS
8764  test -z "$as_dir" && as_dir=.
8765    for ac_exec_ext in '' $ac_executable_extensions; do
8766  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8767    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8769    break 2
8770  fi
8771done
8772  done
8773IFS=$as_save_IFS
8774
8775  ;;
8776esac
8777fi
8778GZIP=$ac_cv_path_GZIP
8779if test -n "$GZIP"; then
8780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8781$as_echo "$GZIP" >&6; }
8782else
8783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8784$as_echo "no" >&6; }
8785fi
8786
8787
8788          if test "x$GZIP" = x; then
8789            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8790          fi
8791        else
8792          # Otherwise we believe it is a complete path. Use it as it is.
8793          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8794$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8795          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8796$as_echo_n "checking for GZIP... " >&6; }
8797          if test ! -x "$tool_specified"; then
8798            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8799$as_echo "not found" >&6; }
8800            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8801          fi
8802          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8803$as_echo "$tool_specified" >&6; }
8804        fi
8805      fi
8806    fi
8807
8808  fi
8809
8810
8811
8812  if test "x$GZIP" = x; then
8813    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8814  fi
8815
8816
8817
8818
8819
8820  # Publish this variable in the help.
8821
8822
8823  if [ -z "${LN+x}" ]; then
8824    # The variable is not set by user, try to locate tool using the code snippet
8825    for ac_prog in ln
8826do
8827  # Extract the first word of "$ac_prog", so it can be a program name with args.
8828set dummy $ac_prog; ac_word=$2
8829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8830$as_echo_n "checking for $ac_word... " >&6; }
8831if ${ac_cv_path_LN+:} false; then :
8832  $as_echo_n "(cached) " >&6
8833else
8834  case $LN in
8835  [\\/]* | ?:[\\/]*)
8836  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8837  ;;
8838  *)
8839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8840for as_dir in $PATH
8841do
8842  IFS=$as_save_IFS
8843  test -z "$as_dir" && as_dir=.
8844    for ac_exec_ext in '' $ac_executable_extensions; do
8845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8846    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8848    break 2
8849  fi
8850done
8851  done
8852IFS=$as_save_IFS
8853
8854  ;;
8855esac
8856fi
8857LN=$ac_cv_path_LN
8858if test -n "$LN"; then
8859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8860$as_echo "$LN" >&6; }
8861else
8862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8863$as_echo "no" >&6; }
8864fi
8865
8866
8867  test -n "$LN" && break
8868done
8869
8870  else
8871    # The variable is set, but is it from the command line or the environment?
8872
8873    # Try to remove the string !LN! from our list.
8874    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8875    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8876      # If it failed, the variable was not from the command line. Ignore it,
8877      # but warn the user (except for BASH, which is always set by the calling BASH).
8878      if test "xLN" != xBASH; then
8879        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8880$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8881      fi
8882      # Try to locate tool using the code snippet
8883      for ac_prog in ln
8884do
8885  # Extract the first word of "$ac_prog", so it can be a program name with args.
8886set dummy $ac_prog; ac_word=$2
8887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8888$as_echo_n "checking for $ac_word... " >&6; }
8889if ${ac_cv_path_LN+:} false; then :
8890  $as_echo_n "(cached) " >&6
8891else
8892  case $LN in
8893  [\\/]* | ?:[\\/]*)
8894  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8895  ;;
8896  *)
8897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8898for as_dir in $PATH
8899do
8900  IFS=$as_save_IFS
8901  test -z "$as_dir" && as_dir=.
8902    for ac_exec_ext in '' $ac_executable_extensions; do
8903  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8904    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8906    break 2
8907  fi
8908done
8909  done
8910IFS=$as_save_IFS
8911
8912  ;;
8913esac
8914fi
8915LN=$ac_cv_path_LN
8916if test -n "$LN"; then
8917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8918$as_echo "$LN" >&6; }
8919else
8920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8921$as_echo "no" >&6; }
8922fi
8923
8924
8925  test -n "$LN" && break
8926done
8927
8928    else
8929      # If it succeeded, then it was overridden by the user. We will use it
8930      # for the tool.
8931
8932      # First remove it from the list of overridden variables, so we can test
8933      # for unknown variables in the end.
8934      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8935
8936      # Check if we try to supply an empty value
8937      if test "x$LN" = x; then
8938        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8939$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8940        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8941$as_echo_n "checking for LN... " >&6; }
8942        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8943$as_echo "disabled" >&6; }
8944      else
8945        # Check if the provided tool contains a complete path.
8946        tool_specified="$LN"
8947        tool_basename="${tool_specified##*/}"
8948        if test "x$tool_basename" = "x$tool_specified"; then
8949          # A command without a complete path is provided, search $PATH.
8950          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8951$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8952          # Extract the first word of "$tool_basename", so it can be a program name with args.
8953set dummy $tool_basename; ac_word=$2
8954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8955$as_echo_n "checking for $ac_word... " >&6; }
8956if ${ac_cv_path_LN+:} false; then :
8957  $as_echo_n "(cached) " >&6
8958else
8959  case $LN in
8960  [\\/]* | ?:[\\/]*)
8961  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8962  ;;
8963  *)
8964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8965for as_dir in $PATH
8966do
8967  IFS=$as_save_IFS
8968  test -z "$as_dir" && as_dir=.
8969    for ac_exec_ext in '' $ac_executable_extensions; do
8970  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8971    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8973    break 2
8974  fi
8975done
8976  done
8977IFS=$as_save_IFS
8978
8979  ;;
8980esac
8981fi
8982LN=$ac_cv_path_LN
8983if test -n "$LN"; then
8984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8985$as_echo "$LN" >&6; }
8986else
8987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8988$as_echo "no" >&6; }
8989fi
8990
8991
8992          if test "x$LN" = x; then
8993            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8994          fi
8995        else
8996          # Otherwise we believe it is a complete path. Use it as it is.
8997          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8998$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8999          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9000$as_echo_n "checking for LN... " >&6; }
9001          if test ! -x "$tool_specified"; then
9002            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9003$as_echo "not found" >&6; }
9004            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9005          fi
9006          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9007$as_echo "$tool_specified" >&6; }
9008        fi
9009      fi
9010    fi
9011
9012  fi
9013
9014
9015
9016  if test "x$LN" = x; then
9017    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9018  fi
9019
9020
9021
9022
9023
9024  # Publish this variable in the help.
9025
9026
9027  if [ -z "${LS+x}" ]; then
9028    # The variable is not set by user, try to locate tool using the code snippet
9029    for ac_prog in ls
9030do
9031  # Extract the first word of "$ac_prog", so it can be a program name with args.
9032set dummy $ac_prog; ac_word=$2
9033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9034$as_echo_n "checking for $ac_word... " >&6; }
9035if ${ac_cv_path_LS+:} false; then :
9036  $as_echo_n "(cached) " >&6
9037else
9038  case $LS in
9039  [\\/]* | ?:[\\/]*)
9040  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9041  ;;
9042  *)
9043  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9044for as_dir in $PATH
9045do
9046  IFS=$as_save_IFS
9047  test -z "$as_dir" && as_dir=.
9048    for ac_exec_ext in '' $ac_executable_extensions; do
9049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9050    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9052    break 2
9053  fi
9054done
9055  done
9056IFS=$as_save_IFS
9057
9058  ;;
9059esac
9060fi
9061LS=$ac_cv_path_LS
9062if test -n "$LS"; then
9063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9064$as_echo "$LS" >&6; }
9065else
9066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9067$as_echo "no" >&6; }
9068fi
9069
9070
9071  test -n "$LS" && break
9072done
9073
9074  else
9075    # The variable is set, but is it from the command line or the environment?
9076
9077    # Try to remove the string !LS! from our list.
9078    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9079    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9080      # If it failed, the variable was not from the command line. Ignore it,
9081      # but warn the user (except for BASH, which is always set by the calling BASH).
9082      if test "xLS" != xBASH; then
9083        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9084$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9085      fi
9086      # Try to locate tool using the code snippet
9087      for ac_prog in ls
9088do
9089  # Extract the first word of "$ac_prog", so it can be a program name with args.
9090set dummy $ac_prog; ac_word=$2
9091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9092$as_echo_n "checking for $ac_word... " >&6; }
9093if ${ac_cv_path_LS+:} false; then :
9094  $as_echo_n "(cached) " >&6
9095else
9096  case $LS in
9097  [\\/]* | ?:[\\/]*)
9098  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9099  ;;
9100  *)
9101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9102for as_dir in $PATH
9103do
9104  IFS=$as_save_IFS
9105  test -z "$as_dir" && as_dir=.
9106    for ac_exec_ext in '' $ac_executable_extensions; do
9107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9108    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9110    break 2
9111  fi
9112done
9113  done
9114IFS=$as_save_IFS
9115
9116  ;;
9117esac
9118fi
9119LS=$ac_cv_path_LS
9120if test -n "$LS"; then
9121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9122$as_echo "$LS" >&6; }
9123else
9124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9125$as_echo "no" >&6; }
9126fi
9127
9128
9129  test -n "$LS" && break
9130done
9131
9132    else
9133      # If it succeeded, then it was overridden by the user. We will use it
9134      # for the tool.
9135
9136      # First remove it from the list of overridden variables, so we can test
9137      # for unknown variables in the end.
9138      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9139
9140      # Check if we try to supply an empty value
9141      if test "x$LS" = x; then
9142        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9143$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9144        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9145$as_echo_n "checking for LS... " >&6; }
9146        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9147$as_echo "disabled" >&6; }
9148      else
9149        # Check if the provided tool contains a complete path.
9150        tool_specified="$LS"
9151        tool_basename="${tool_specified##*/}"
9152        if test "x$tool_basename" = "x$tool_specified"; then
9153          # A command without a complete path is provided, search $PATH.
9154          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9155$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9156          # Extract the first word of "$tool_basename", so it can be a program name with args.
9157set dummy $tool_basename; ac_word=$2
9158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9159$as_echo_n "checking for $ac_word... " >&6; }
9160if ${ac_cv_path_LS+:} false; then :
9161  $as_echo_n "(cached) " >&6
9162else
9163  case $LS in
9164  [\\/]* | ?:[\\/]*)
9165  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9166  ;;
9167  *)
9168  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9169for as_dir in $PATH
9170do
9171  IFS=$as_save_IFS
9172  test -z "$as_dir" && as_dir=.
9173    for ac_exec_ext in '' $ac_executable_extensions; do
9174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9175    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9177    break 2
9178  fi
9179done
9180  done
9181IFS=$as_save_IFS
9182
9183  ;;
9184esac
9185fi
9186LS=$ac_cv_path_LS
9187if test -n "$LS"; then
9188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9189$as_echo "$LS" >&6; }
9190else
9191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9192$as_echo "no" >&6; }
9193fi
9194
9195
9196          if test "x$LS" = x; then
9197            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9198          fi
9199        else
9200          # Otherwise we believe it is a complete path. Use it as it is.
9201          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9202$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9203          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9204$as_echo_n "checking for LS... " >&6; }
9205          if test ! -x "$tool_specified"; then
9206            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9207$as_echo "not found" >&6; }
9208            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9209          fi
9210          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9211$as_echo "$tool_specified" >&6; }
9212        fi
9213      fi
9214    fi
9215
9216  fi
9217
9218
9219
9220  if test "x$LS" = x; then
9221    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9222  fi
9223
9224
9225
9226
9227
9228  # Publish this variable in the help.
9229
9230
9231  if [ -z "${MKDIR+x}" ]; then
9232    # The variable is not set by user, try to locate tool using the code snippet
9233    for ac_prog in mkdir
9234do
9235  # Extract the first word of "$ac_prog", so it can be a program name with args.
9236set dummy $ac_prog; ac_word=$2
9237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9238$as_echo_n "checking for $ac_word... " >&6; }
9239if ${ac_cv_path_MKDIR+:} false; then :
9240  $as_echo_n "(cached) " >&6
9241else
9242  case $MKDIR in
9243  [\\/]* | ?:[\\/]*)
9244  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9245  ;;
9246  *)
9247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9248for as_dir in $PATH
9249do
9250  IFS=$as_save_IFS
9251  test -z "$as_dir" && as_dir=.
9252    for ac_exec_ext in '' $ac_executable_extensions; do
9253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9254    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9256    break 2
9257  fi
9258done
9259  done
9260IFS=$as_save_IFS
9261
9262  ;;
9263esac
9264fi
9265MKDIR=$ac_cv_path_MKDIR
9266if test -n "$MKDIR"; then
9267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9268$as_echo "$MKDIR" >&6; }
9269else
9270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9271$as_echo "no" >&6; }
9272fi
9273
9274
9275  test -n "$MKDIR" && break
9276done
9277
9278  else
9279    # The variable is set, but is it from the command line or the environment?
9280
9281    # Try to remove the string !MKDIR! from our list.
9282    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9283    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9284      # If it failed, the variable was not from the command line. Ignore it,
9285      # but warn the user (except for BASH, which is always set by the calling BASH).
9286      if test "xMKDIR" != xBASH; then
9287        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9288$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9289      fi
9290      # Try to locate tool using the code snippet
9291      for ac_prog in mkdir
9292do
9293  # Extract the first word of "$ac_prog", so it can be a program name with args.
9294set dummy $ac_prog; ac_word=$2
9295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9296$as_echo_n "checking for $ac_word... " >&6; }
9297if ${ac_cv_path_MKDIR+:} false; then :
9298  $as_echo_n "(cached) " >&6
9299else
9300  case $MKDIR in
9301  [\\/]* | ?:[\\/]*)
9302  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9303  ;;
9304  *)
9305  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9306for as_dir in $PATH
9307do
9308  IFS=$as_save_IFS
9309  test -z "$as_dir" && as_dir=.
9310    for ac_exec_ext in '' $ac_executable_extensions; do
9311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9312    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9314    break 2
9315  fi
9316done
9317  done
9318IFS=$as_save_IFS
9319
9320  ;;
9321esac
9322fi
9323MKDIR=$ac_cv_path_MKDIR
9324if test -n "$MKDIR"; then
9325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9326$as_echo "$MKDIR" >&6; }
9327else
9328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9329$as_echo "no" >&6; }
9330fi
9331
9332
9333  test -n "$MKDIR" && break
9334done
9335
9336    else
9337      # If it succeeded, then it was overridden by the user. We will use it
9338      # for the tool.
9339
9340      # First remove it from the list of overridden variables, so we can test
9341      # for unknown variables in the end.
9342      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9343
9344      # Check if we try to supply an empty value
9345      if test "x$MKDIR" = x; then
9346        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9347$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9348        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9349$as_echo_n "checking for MKDIR... " >&6; }
9350        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9351$as_echo "disabled" >&6; }
9352      else
9353        # Check if the provided tool contains a complete path.
9354        tool_specified="$MKDIR"
9355        tool_basename="${tool_specified##*/}"
9356        if test "x$tool_basename" = "x$tool_specified"; then
9357          # A command without a complete path is provided, search $PATH.
9358          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9359$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9360          # Extract the first word of "$tool_basename", so it can be a program name with args.
9361set dummy $tool_basename; ac_word=$2
9362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9363$as_echo_n "checking for $ac_word... " >&6; }
9364if ${ac_cv_path_MKDIR+:} false; then :
9365  $as_echo_n "(cached) " >&6
9366else
9367  case $MKDIR in
9368  [\\/]* | ?:[\\/]*)
9369  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9370  ;;
9371  *)
9372  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9373for as_dir in $PATH
9374do
9375  IFS=$as_save_IFS
9376  test -z "$as_dir" && as_dir=.
9377    for ac_exec_ext in '' $ac_executable_extensions; do
9378  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9379    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9381    break 2
9382  fi
9383done
9384  done
9385IFS=$as_save_IFS
9386
9387  ;;
9388esac
9389fi
9390MKDIR=$ac_cv_path_MKDIR
9391if test -n "$MKDIR"; then
9392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9393$as_echo "$MKDIR" >&6; }
9394else
9395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9396$as_echo "no" >&6; }
9397fi
9398
9399
9400          if test "x$MKDIR" = x; then
9401            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9402          fi
9403        else
9404          # Otherwise we believe it is a complete path. Use it as it is.
9405          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9406$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9407          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9408$as_echo_n "checking for MKDIR... " >&6; }
9409          if test ! -x "$tool_specified"; then
9410            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9411$as_echo "not found" >&6; }
9412            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9413          fi
9414          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9415$as_echo "$tool_specified" >&6; }
9416        fi
9417      fi
9418    fi
9419
9420  fi
9421
9422
9423
9424  if test "x$MKDIR" = x; then
9425    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9426  fi
9427
9428
9429
9430
9431
9432  # Publish this variable in the help.
9433
9434
9435  if [ -z "${MKTEMP+x}" ]; then
9436    # The variable is not set by user, try to locate tool using the code snippet
9437    for ac_prog in mktemp
9438do
9439  # Extract the first word of "$ac_prog", so it can be a program name with args.
9440set dummy $ac_prog; ac_word=$2
9441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9442$as_echo_n "checking for $ac_word... " >&6; }
9443if ${ac_cv_path_MKTEMP+:} false; then :
9444  $as_echo_n "(cached) " >&6
9445else
9446  case $MKTEMP in
9447  [\\/]* | ?:[\\/]*)
9448  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9449  ;;
9450  *)
9451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9452for as_dir in $PATH
9453do
9454  IFS=$as_save_IFS
9455  test -z "$as_dir" && as_dir=.
9456    for ac_exec_ext in '' $ac_executable_extensions; do
9457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9458    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9460    break 2
9461  fi
9462done
9463  done
9464IFS=$as_save_IFS
9465
9466  ;;
9467esac
9468fi
9469MKTEMP=$ac_cv_path_MKTEMP
9470if test -n "$MKTEMP"; then
9471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9472$as_echo "$MKTEMP" >&6; }
9473else
9474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9475$as_echo "no" >&6; }
9476fi
9477
9478
9479  test -n "$MKTEMP" && break
9480done
9481
9482  else
9483    # The variable is set, but is it from the command line or the environment?
9484
9485    # Try to remove the string !MKTEMP! from our list.
9486    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9487    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9488      # If it failed, the variable was not from the command line. Ignore it,
9489      # but warn the user (except for BASH, which is always set by the calling BASH).
9490      if test "xMKTEMP" != xBASH; then
9491        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9492$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9493      fi
9494      # Try to locate tool using the code snippet
9495      for ac_prog in mktemp
9496do
9497  # Extract the first word of "$ac_prog", so it can be a program name with args.
9498set dummy $ac_prog; ac_word=$2
9499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9500$as_echo_n "checking for $ac_word... " >&6; }
9501if ${ac_cv_path_MKTEMP+:} false; then :
9502  $as_echo_n "(cached) " >&6
9503else
9504  case $MKTEMP in
9505  [\\/]* | ?:[\\/]*)
9506  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9507  ;;
9508  *)
9509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9510for as_dir in $PATH
9511do
9512  IFS=$as_save_IFS
9513  test -z "$as_dir" && as_dir=.
9514    for ac_exec_ext in '' $ac_executable_extensions; do
9515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9516    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9518    break 2
9519  fi
9520done
9521  done
9522IFS=$as_save_IFS
9523
9524  ;;
9525esac
9526fi
9527MKTEMP=$ac_cv_path_MKTEMP
9528if test -n "$MKTEMP"; then
9529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9530$as_echo "$MKTEMP" >&6; }
9531else
9532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9533$as_echo "no" >&6; }
9534fi
9535
9536
9537  test -n "$MKTEMP" && break
9538done
9539
9540    else
9541      # If it succeeded, then it was overridden by the user. We will use it
9542      # for the tool.
9543
9544      # First remove it from the list of overridden variables, so we can test
9545      # for unknown variables in the end.
9546      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9547
9548      # Check if we try to supply an empty value
9549      if test "x$MKTEMP" = x; then
9550        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9551$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9552        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9553$as_echo_n "checking for MKTEMP... " >&6; }
9554        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9555$as_echo "disabled" >&6; }
9556      else
9557        # Check if the provided tool contains a complete path.
9558        tool_specified="$MKTEMP"
9559        tool_basename="${tool_specified##*/}"
9560        if test "x$tool_basename" = "x$tool_specified"; then
9561          # A command without a complete path is provided, search $PATH.
9562          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9563$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9564          # Extract the first word of "$tool_basename", so it can be a program name with args.
9565set dummy $tool_basename; ac_word=$2
9566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9567$as_echo_n "checking for $ac_word... " >&6; }
9568if ${ac_cv_path_MKTEMP+:} false; then :
9569  $as_echo_n "(cached) " >&6
9570else
9571  case $MKTEMP in
9572  [\\/]* | ?:[\\/]*)
9573  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9574  ;;
9575  *)
9576  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9577for as_dir in $PATH
9578do
9579  IFS=$as_save_IFS
9580  test -z "$as_dir" && as_dir=.
9581    for ac_exec_ext in '' $ac_executable_extensions; do
9582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9583    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9585    break 2
9586  fi
9587done
9588  done
9589IFS=$as_save_IFS
9590
9591  ;;
9592esac
9593fi
9594MKTEMP=$ac_cv_path_MKTEMP
9595if test -n "$MKTEMP"; then
9596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9597$as_echo "$MKTEMP" >&6; }
9598else
9599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9600$as_echo "no" >&6; }
9601fi
9602
9603
9604          if test "x$MKTEMP" = x; then
9605            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9606          fi
9607        else
9608          # Otherwise we believe it is a complete path. Use it as it is.
9609          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9610$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9611          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9612$as_echo_n "checking for MKTEMP... " >&6; }
9613          if test ! -x "$tool_specified"; then
9614            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9615$as_echo "not found" >&6; }
9616            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9617          fi
9618          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9619$as_echo "$tool_specified" >&6; }
9620        fi
9621      fi
9622    fi
9623
9624  fi
9625
9626
9627
9628  if test "x$MKTEMP" = x; then
9629    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9630  fi
9631
9632
9633
9634
9635
9636  # Publish this variable in the help.
9637
9638
9639  if [ -z "${MV+x}" ]; then
9640    # The variable is not set by user, try to locate tool using the code snippet
9641    for ac_prog in mv
9642do
9643  # Extract the first word of "$ac_prog", so it can be a program name with args.
9644set dummy $ac_prog; ac_word=$2
9645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9646$as_echo_n "checking for $ac_word... " >&6; }
9647if ${ac_cv_path_MV+:} false; then :
9648  $as_echo_n "(cached) " >&6
9649else
9650  case $MV in
9651  [\\/]* | ?:[\\/]*)
9652  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9653  ;;
9654  *)
9655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9656for as_dir in $PATH
9657do
9658  IFS=$as_save_IFS
9659  test -z "$as_dir" && as_dir=.
9660    for ac_exec_ext in '' $ac_executable_extensions; do
9661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9662    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9664    break 2
9665  fi
9666done
9667  done
9668IFS=$as_save_IFS
9669
9670  ;;
9671esac
9672fi
9673MV=$ac_cv_path_MV
9674if test -n "$MV"; then
9675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9676$as_echo "$MV" >&6; }
9677else
9678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9679$as_echo "no" >&6; }
9680fi
9681
9682
9683  test -n "$MV" && break
9684done
9685
9686  else
9687    # The variable is set, but is it from the command line or the environment?
9688
9689    # Try to remove the string !MV! from our list.
9690    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9691    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9692      # If it failed, the variable was not from the command line. Ignore it,
9693      # but warn the user (except for BASH, which is always set by the calling BASH).
9694      if test "xMV" != xBASH; then
9695        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9696$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9697      fi
9698      # Try to locate tool using the code snippet
9699      for ac_prog in mv
9700do
9701  # Extract the first word of "$ac_prog", so it can be a program name with args.
9702set dummy $ac_prog; ac_word=$2
9703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9704$as_echo_n "checking for $ac_word... " >&6; }
9705if ${ac_cv_path_MV+:} false; then :
9706  $as_echo_n "(cached) " >&6
9707else
9708  case $MV in
9709  [\\/]* | ?:[\\/]*)
9710  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9711  ;;
9712  *)
9713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9714for as_dir in $PATH
9715do
9716  IFS=$as_save_IFS
9717  test -z "$as_dir" && as_dir=.
9718    for ac_exec_ext in '' $ac_executable_extensions; do
9719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9720    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9722    break 2
9723  fi
9724done
9725  done
9726IFS=$as_save_IFS
9727
9728  ;;
9729esac
9730fi
9731MV=$ac_cv_path_MV
9732if test -n "$MV"; then
9733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9734$as_echo "$MV" >&6; }
9735else
9736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9737$as_echo "no" >&6; }
9738fi
9739
9740
9741  test -n "$MV" && break
9742done
9743
9744    else
9745      # If it succeeded, then it was overridden by the user. We will use it
9746      # for the tool.
9747
9748      # First remove it from the list of overridden variables, so we can test
9749      # for unknown variables in the end.
9750      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9751
9752      # Check if we try to supply an empty value
9753      if test "x$MV" = x; then
9754        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9755$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9756        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9757$as_echo_n "checking for MV... " >&6; }
9758        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9759$as_echo "disabled" >&6; }
9760      else
9761        # Check if the provided tool contains a complete path.
9762        tool_specified="$MV"
9763        tool_basename="${tool_specified##*/}"
9764        if test "x$tool_basename" = "x$tool_specified"; then
9765          # A command without a complete path is provided, search $PATH.
9766          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9767$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9768          # Extract the first word of "$tool_basename", so it can be a program name with args.
9769set dummy $tool_basename; ac_word=$2
9770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9771$as_echo_n "checking for $ac_word... " >&6; }
9772if ${ac_cv_path_MV+:} false; then :
9773  $as_echo_n "(cached) " >&6
9774else
9775  case $MV in
9776  [\\/]* | ?:[\\/]*)
9777  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9778  ;;
9779  *)
9780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9781for as_dir in $PATH
9782do
9783  IFS=$as_save_IFS
9784  test -z "$as_dir" && as_dir=.
9785    for ac_exec_ext in '' $ac_executable_extensions; do
9786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9787    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9789    break 2
9790  fi
9791done
9792  done
9793IFS=$as_save_IFS
9794
9795  ;;
9796esac
9797fi
9798MV=$ac_cv_path_MV
9799if test -n "$MV"; then
9800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9801$as_echo "$MV" >&6; }
9802else
9803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9804$as_echo "no" >&6; }
9805fi
9806
9807
9808          if test "x$MV" = x; then
9809            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9810          fi
9811        else
9812          # Otherwise we believe it is a complete path. Use it as it is.
9813          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9814$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9815          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9816$as_echo_n "checking for MV... " >&6; }
9817          if test ! -x "$tool_specified"; then
9818            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9819$as_echo "not found" >&6; }
9820            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9821          fi
9822          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9823$as_echo "$tool_specified" >&6; }
9824        fi
9825      fi
9826    fi
9827
9828  fi
9829
9830
9831
9832  if test "x$MV" = x; then
9833    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9834  fi
9835
9836
9837
9838
9839
9840  # Publish this variable in the help.
9841
9842
9843  if [ -z "${NAWK+x}" ]; then
9844    # The variable is not set by user, try to locate tool using the code snippet
9845    for ac_prog in nawk gawk awk
9846do
9847  # Extract the first word of "$ac_prog", so it can be a program name with args.
9848set dummy $ac_prog; ac_word=$2
9849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9850$as_echo_n "checking for $ac_word... " >&6; }
9851if ${ac_cv_path_NAWK+:} false; then :
9852  $as_echo_n "(cached) " >&6
9853else
9854  case $NAWK in
9855  [\\/]* | ?:[\\/]*)
9856  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9857  ;;
9858  *)
9859  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9860for as_dir in $PATH
9861do
9862  IFS=$as_save_IFS
9863  test -z "$as_dir" && as_dir=.
9864    for ac_exec_ext in '' $ac_executable_extensions; do
9865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9866    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9868    break 2
9869  fi
9870done
9871  done
9872IFS=$as_save_IFS
9873
9874  ;;
9875esac
9876fi
9877NAWK=$ac_cv_path_NAWK
9878if test -n "$NAWK"; then
9879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9880$as_echo "$NAWK" >&6; }
9881else
9882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9883$as_echo "no" >&6; }
9884fi
9885
9886
9887  test -n "$NAWK" && break
9888done
9889
9890  else
9891    # The variable is set, but is it from the command line or the environment?
9892
9893    # Try to remove the string !NAWK! from our list.
9894    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9895    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9896      # If it failed, the variable was not from the command line. Ignore it,
9897      # but warn the user (except for BASH, which is always set by the calling BASH).
9898      if test "xNAWK" != xBASH; then
9899        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9900$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9901      fi
9902      # Try to locate tool using the code snippet
9903      for ac_prog in nawk gawk awk
9904do
9905  # Extract the first word of "$ac_prog", so it can be a program name with args.
9906set dummy $ac_prog; ac_word=$2
9907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9908$as_echo_n "checking for $ac_word... " >&6; }
9909if ${ac_cv_path_NAWK+:} false; then :
9910  $as_echo_n "(cached) " >&6
9911else
9912  case $NAWK in
9913  [\\/]* | ?:[\\/]*)
9914  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9915  ;;
9916  *)
9917  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9918for as_dir in $PATH
9919do
9920  IFS=$as_save_IFS
9921  test -z "$as_dir" && as_dir=.
9922    for ac_exec_ext in '' $ac_executable_extensions; do
9923  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9924    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9925    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9926    break 2
9927  fi
9928done
9929  done
9930IFS=$as_save_IFS
9931
9932  ;;
9933esac
9934fi
9935NAWK=$ac_cv_path_NAWK
9936if test -n "$NAWK"; then
9937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9938$as_echo "$NAWK" >&6; }
9939else
9940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9941$as_echo "no" >&6; }
9942fi
9943
9944
9945  test -n "$NAWK" && break
9946done
9947
9948    else
9949      # If it succeeded, then it was overridden by the user. We will use it
9950      # for the tool.
9951
9952      # First remove it from the list of overridden variables, so we can test
9953      # for unknown variables in the end.
9954      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9955
9956      # Check if we try to supply an empty value
9957      if test "x$NAWK" = x; then
9958        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9959$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9960        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9961$as_echo_n "checking for NAWK... " >&6; }
9962        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9963$as_echo "disabled" >&6; }
9964      else
9965        # Check if the provided tool contains a complete path.
9966        tool_specified="$NAWK"
9967        tool_basename="${tool_specified##*/}"
9968        if test "x$tool_basename" = "x$tool_specified"; then
9969          # A command without a complete path is provided, search $PATH.
9970          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9971$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9972          # Extract the first word of "$tool_basename", so it can be a program name with args.
9973set dummy $tool_basename; ac_word=$2
9974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9975$as_echo_n "checking for $ac_word... " >&6; }
9976if ${ac_cv_path_NAWK+:} false; then :
9977  $as_echo_n "(cached) " >&6
9978else
9979  case $NAWK in
9980  [\\/]* | ?:[\\/]*)
9981  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9982  ;;
9983  *)
9984  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9985for as_dir in $PATH
9986do
9987  IFS=$as_save_IFS
9988  test -z "$as_dir" && as_dir=.
9989    for ac_exec_ext in '' $ac_executable_extensions; do
9990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9991    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9993    break 2
9994  fi
9995done
9996  done
9997IFS=$as_save_IFS
9998
9999  ;;
10000esac
10001fi
10002NAWK=$ac_cv_path_NAWK
10003if test -n "$NAWK"; then
10004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10005$as_echo "$NAWK" >&6; }
10006else
10007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10008$as_echo "no" >&6; }
10009fi
10010
10011
10012          if test "x$NAWK" = x; then
10013            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10014          fi
10015        else
10016          # Otherwise we believe it is a complete path. Use it as it is.
10017          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10018$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10019          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10020$as_echo_n "checking for NAWK... " >&6; }
10021          if test ! -x "$tool_specified"; then
10022            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10023$as_echo "not found" >&6; }
10024            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10025          fi
10026          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10027$as_echo "$tool_specified" >&6; }
10028        fi
10029      fi
10030    fi
10031
10032  fi
10033
10034
10035
10036  if test "x$NAWK" = x; then
10037    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10038  fi
10039
10040
10041
10042
10043
10044  # Publish this variable in the help.
10045
10046
10047  if [ -z "${PRINTF+x}" ]; then
10048    # The variable is not set by user, try to locate tool using the code snippet
10049    for ac_prog in printf
10050do
10051  # Extract the first word of "$ac_prog", so it can be a program name with args.
10052set dummy $ac_prog; ac_word=$2
10053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10054$as_echo_n "checking for $ac_word... " >&6; }
10055if ${ac_cv_path_PRINTF+:} false; then :
10056  $as_echo_n "(cached) " >&6
10057else
10058  case $PRINTF in
10059  [\\/]* | ?:[\\/]*)
10060  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10061  ;;
10062  *)
10063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10064for as_dir in $PATH
10065do
10066  IFS=$as_save_IFS
10067  test -z "$as_dir" && as_dir=.
10068    for ac_exec_ext in '' $ac_executable_extensions; do
10069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10070    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10072    break 2
10073  fi
10074done
10075  done
10076IFS=$as_save_IFS
10077
10078  ;;
10079esac
10080fi
10081PRINTF=$ac_cv_path_PRINTF
10082if test -n "$PRINTF"; then
10083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10084$as_echo "$PRINTF" >&6; }
10085else
10086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10087$as_echo "no" >&6; }
10088fi
10089
10090
10091  test -n "$PRINTF" && break
10092done
10093
10094  else
10095    # The variable is set, but is it from the command line or the environment?
10096
10097    # Try to remove the string !PRINTF! from our list.
10098    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10099    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10100      # If it failed, the variable was not from the command line. Ignore it,
10101      # but warn the user (except for BASH, which is always set by the calling BASH).
10102      if test "xPRINTF" != xBASH; then
10103        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10104$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10105      fi
10106      # Try to locate tool using the code snippet
10107      for ac_prog in printf
10108do
10109  # Extract the first word of "$ac_prog", so it can be a program name with args.
10110set dummy $ac_prog; ac_word=$2
10111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10112$as_echo_n "checking for $ac_word... " >&6; }
10113if ${ac_cv_path_PRINTF+:} false; then :
10114  $as_echo_n "(cached) " >&6
10115else
10116  case $PRINTF in
10117  [\\/]* | ?:[\\/]*)
10118  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10119  ;;
10120  *)
10121  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10122for as_dir in $PATH
10123do
10124  IFS=$as_save_IFS
10125  test -z "$as_dir" && as_dir=.
10126    for ac_exec_ext in '' $ac_executable_extensions; do
10127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10128    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10130    break 2
10131  fi
10132done
10133  done
10134IFS=$as_save_IFS
10135
10136  ;;
10137esac
10138fi
10139PRINTF=$ac_cv_path_PRINTF
10140if test -n "$PRINTF"; then
10141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10142$as_echo "$PRINTF" >&6; }
10143else
10144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10145$as_echo "no" >&6; }
10146fi
10147
10148
10149  test -n "$PRINTF" && break
10150done
10151
10152    else
10153      # If it succeeded, then it was overridden by the user. We will use it
10154      # for the tool.
10155
10156      # First remove it from the list of overridden variables, so we can test
10157      # for unknown variables in the end.
10158      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10159
10160      # Check if we try to supply an empty value
10161      if test "x$PRINTF" = x; then
10162        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10163$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10164        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10165$as_echo_n "checking for PRINTF... " >&6; }
10166        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10167$as_echo "disabled" >&6; }
10168      else
10169        # Check if the provided tool contains a complete path.
10170        tool_specified="$PRINTF"
10171        tool_basename="${tool_specified##*/}"
10172        if test "x$tool_basename" = "x$tool_specified"; then
10173          # A command without a complete path is provided, search $PATH.
10174          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10175$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10176          # Extract the first word of "$tool_basename", so it can be a program name with args.
10177set dummy $tool_basename; ac_word=$2
10178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10179$as_echo_n "checking for $ac_word... " >&6; }
10180if ${ac_cv_path_PRINTF+:} false; then :
10181  $as_echo_n "(cached) " >&6
10182else
10183  case $PRINTF in
10184  [\\/]* | ?:[\\/]*)
10185  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10186  ;;
10187  *)
10188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10189for as_dir in $PATH
10190do
10191  IFS=$as_save_IFS
10192  test -z "$as_dir" && as_dir=.
10193    for ac_exec_ext in '' $ac_executable_extensions; do
10194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10195    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10197    break 2
10198  fi
10199done
10200  done
10201IFS=$as_save_IFS
10202
10203  ;;
10204esac
10205fi
10206PRINTF=$ac_cv_path_PRINTF
10207if test -n "$PRINTF"; then
10208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10209$as_echo "$PRINTF" >&6; }
10210else
10211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10212$as_echo "no" >&6; }
10213fi
10214
10215
10216          if test "x$PRINTF" = x; then
10217            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10218          fi
10219        else
10220          # Otherwise we believe it is a complete path. Use it as it is.
10221          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10222$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10223          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10224$as_echo_n "checking for PRINTF... " >&6; }
10225          if test ! -x "$tool_specified"; then
10226            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10227$as_echo "not found" >&6; }
10228            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10229          fi
10230          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10231$as_echo "$tool_specified" >&6; }
10232        fi
10233      fi
10234    fi
10235
10236  fi
10237
10238
10239
10240  if test "x$PRINTF" = x; then
10241    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10242  fi
10243
10244
10245
10246
10247
10248  # Publish this variable in the help.
10249
10250
10251  if [ -z "${RM+x}" ]; then
10252    # The variable is not set by user, try to locate tool using the code snippet
10253    for ac_prog in rm
10254do
10255  # Extract the first word of "$ac_prog", so it can be a program name with args.
10256set dummy $ac_prog; ac_word=$2
10257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10258$as_echo_n "checking for $ac_word... " >&6; }
10259if ${ac_cv_path_RM+:} false; then :
10260  $as_echo_n "(cached) " >&6
10261else
10262  case $RM in
10263  [\\/]* | ?:[\\/]*)
10264  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10265  ;;
10266  *)
10267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10268for as_dir in $PATH
10269do
10270  IFS=$as_save_IFS
10271  test -z "$as_dir" && as_dir=.
10272    for ac_exec_ext in '' $ac_executable_extensions; do
10273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10274    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10276    break 2
10277  fi
10278done
10279  done
10280IFS=$as_save_IFS
10281
10282  ;;
10283esac
10284fi
10285RM=$ac_cv_path_RM
10286if test -n "$RM"; then
10287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10288$as_echo "$RM" >&6; }
10289else
10290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10291$as_echo "no" >&6; }
10292fi
10293
10294
10295  test -n "$RM" && break
10296done
10297
10298  else
10299    # The variable is set, but is it from the command line or the environment?
10300
10301    # Try to remove the string !RM! from our list.
10302    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10303    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10304      # If it failed, the variable was not from the command line. Ignore it,
10305      # but warn the user (except for BASH, which is always set by the calling BASH).
10306      if test "xRM" != xBASH; then
10307        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10308$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10309      fi
10310      # Try to locate tool using the code snippet
10311      for ac_prog in rm
10312do
10313  # Extract the first word of "$ac_prog", so it can be a program name with args.
10314set dummy $ac_prog; ac_word=$2
10315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10316$as_echo_n "checking for $ac_word... " >&6; }
10317if ${ac_cv_path_RM+:} false; then :
10318  $as_echo_n "(cached) " >&6
10319else
10320  case $RM in
10321  [\\/]* | ?:[\\/]*)
10322  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10323  ;;
10324  *)
10325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10326for as_dir in $PATH
10327do
10328  IFS=$as_save_IFS
10329  test -z "$as_dir" && as_dir=.
10330    for ac_exec_ext in '' $ac_executable_extensions; do
10331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10332    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10334    break 2
10335  fi
10336done
10337  done
10338IFS=$as_save_IFS
10339
10340  ;;
10341esac
10342fi
10343RM=$ac_cv_path_RM
10344if test -n "$RM"; then
10345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10346$as_echo "$RM" >&6; }
10347else
10348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10349$as_echo "no" >&6; }
10350fi
10351
10352
10353  test -n "$RM" && break
10354done
10355
10356    else
10357      # If it succeeded, then it was overridden by the user. We will use it
10358      # for the tool.
10359
10360      # First remove it from the list of overridden variables, so we can test
10361      # for unknown variables in the end.
10362      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10363
10364      # Check if we try to supply an empty value
10365      if test "x$RM" = x; then
10366        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10367$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10368        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10369$as_echo_n "checking for RM... " >&6; }
10370        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10371$as_echo "disabled" >&6; }
10372      else
10373        # Check if the provided tool contains a complete path.
10374        tool_specified="$RM"
10375        tool_basename="${tool_specified##*/}"
10376        if test "x$tool_basename" = "x$tool_specified"; then
10377          # A command without a complete path is provided, search $PATH.
10378          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10379$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10380          # Extract the first word of "$tool_basename", so it can be a program name with args.
10381set dummy $tool_basename; ac_word=$2
10382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10383$as_echo_n "checking for $ac_word... " >&6; }
10384if ${ac_cv_path_RM+:} false; then :
10385  $as_echo_n "(cached) " >&6
10386else
10387  case $RM in
10388  [\\/]* | ?:[\\/]*)
10389  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10390  ;;
10391  *)
10392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10393for as_dir in $PATH
10394do
10395  IFS=$as_save_IFS
10396  test -z "$as_dir" && as_dir=.
10397    for ac_exec_ext in '' $ac_executable_extensions; do
10398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10399    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10401    break 2
10402  fi
10403done
10404  done
10405IFS=$as_save_IFS
10406
10407  ;;
10408esac
10409fi
10410RM=$ac_cv_path_RM
10411if test -n "$RM"; then
10412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10413$as_echo "$RM" >&6; }
10414else
10415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10416$as_echo "no" >&6; }
10417fi
10418
10419
10420          if test "x$RM" = x; then
10421            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10422          fi
10423        else
10424          # Otherwise we believe it is a complete path. Use it as it is.
10425          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10426$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10427          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10428$as_echo_n "checking for RM... " >&6; }
10429          if test ! -x "$tool_specified"; then
10430            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10431$as_echo "not found" >&6; }
10432            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10433          fi
10434          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10435$as_echo "$tool_specified" >&6; }
10436        fi
10437      fi
10438    fi
10439
10440  fi
10441
10442
10443
10444  if test "x$RM" = x; then
10445    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10446  fi
10447
10448
10449
10450
10451
10452  # Publish this variable in the help.
10453
10454
10455  if [ -z "${RMDIR+x}" ]; then
10456    # The variable is not set by user, try to locate tool using the code snippet
10457    for ac_prog in rmdir
10458do
10459  # Extract the first word of "$ac_prog", so it can be a program name with args.
10460set dummy $ac_prog; ac_word=$2
10461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10462$as_echo_n "checking for $ac_word... " >&6; }
10463if ${ac_cv_path_RMDIR+:} false; then :
10464  $as_echo_n "(cached) " >&6
10465else
10466  case $RMDIR in
10467  [\\/]* | ?:[\\/]*)
10468  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10469  ;;
10470  *)
10471  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10472for as_dir in $PATH
10473do
10474  IFS=$as_save_IFS
10475  test -z "$as_dir" && as_dir=.
10476    for ac_exec_ext in '' $ac_executable_extensions; do
10477  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10478    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10479    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10480    break 2
10481  fi
10482done
10483  done
10484IFS=$as_save_IFS
10485
10486  ;;
10487esac
10488fi
10489RMDIR=$ac_cv_path_RMDIR
10490if test -n "$RMDIR"; then
10491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10492$as_echo "$RMDIR" >&6; }
10493else
10494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10495$as_echo "no" >&6; }
10496fi
10497
10498
10499  test -n "$RMDIR" && break
10500done
10501
10502  else
10503    # The variable is set, but is it from the command line or the environment?
10504
10505    # Try to remove the string !RMDIR! from our list.
10506    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10507    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10508      # If it failed, the variable was not from the command line. Ignore it,
10509      # but warn the user (except for BASH, which is always set by the calling BASH).
10510      if test "xRMDIR" != xBASH; then
10511        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10512$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10513      fi
10514      # Try to locate tool using the code snippet
10515      for ac_prog in rmdir
10516do
10517  # Extract the first word of "$ac_prog", so it can be a program name with args.
10518set dummy $ac_prog; ac_word=$2
10519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10520$as_echo_n "checking for $ac_word... " >&6; }
10521if ${ac_cv_path_RMDIR+:} false; then :
10522  $as_echo_n "(cached) " >&6
10523else
10524  case $RMDIR in
10525  [\\/]* | ?:[\\/]*)
10526  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10527  ;;
10528  *)
10529  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10530for as_dir in $PATH
10531do
10532  IFS=$as_save_IFS
10533  test -z "$as_dir" && as_dir=.
10534    for ac_exec_ext in '' $ac_executable_extensions; do
10535  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10536    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10537    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10538    break 2
10539  fi
10540done
10541  done
10542IFS=$as_save_IFS
10543
10544  ;;
10545esac
10546fi
10547RMDIR=$ac_cv_path_RMDIR
10548if test -n "$RMDIR"; then
10549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10550$as_echo "$RMDIR" >&6; }
10551else
10552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10553$as_echo "no" >&6; }
10554fi
10555
10556
10557  test -n "$RMDIR" && break
10558done
10559
10560    else
10561      # If it succeeded, then it was overridden by the user. We will use it
10562      # for the tool.
10563
10564      # First remove it from the list of overridden variables, so we can test
10565      # for unknown variables in the end.
10566      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10567
10568      # Check if we try to supply an empty value
10569      if test "x$RMDIR" = x; then
10570        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10571$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10572        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10573$as_echo_n "checking for RMDIR... " >&6; }
10574        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10575$as_echo "disabled" >&6; }
10576      else
10577        # Check if the provided tool contains a complete path.
10578        tool_specified="$RMDIR"
10579        tool_basename="${tool_specified##*/}"
10580        if test "x$tool_basename" = "x$tool_specified"; then
10581          # A command without a complete path is provided, search $PATH.
10582          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10583$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10584          # Extract the first word of "$tool_basename", so it can be a program name with args.
10585set dummy $tool_basename; ac_word=$2
10586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10587$as_echo_n "checking for $ac_word... " >&6; }
10588if ${ac_cv_path_RMDIR+:} false; then :
10589  $as_echo_n "(cached) " >&6
10590else
10591  case $RMDIR in
10592  [\\/]* | ?:[\\/]*)
10593  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10594  ;;
10595  *)
10596  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10597for as_dir in $PATH
10598do
10599  IFS=$as_save_IFS
10600  test -z "$as_dir" && as_dir=.
10601    for ac_exec_ext in '' $ac_executable_extensions; do
10602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10603    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10605    break 2
10606  fi
10607done
10608  done
10609IFS=$as_save_IFS
10610
10611  ;;
10612esac
10613fi
10614RMDIR=$ac_cv_path_RMDIR
10615if test -n "$RMDIR"; then
10616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10617$as_echo "$RMDIR" >&6; }
10618else
10619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10620$as_echo "no" >&6; }
10621fi
10622
10623
10624          if test "x$RMDIR" = x; then
10625            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10626          fi
10627        else
10628          # Otherwise we believe it is a complete path. Use it as it is.
10629          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10630$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10631          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10632$as_echo_n "checking for RMDIR... " >&6; }
10633          if test ! -x "$tool_specified"; then
10634            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10635$as_echo "not found" >&6; }
10636            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10637          fi
10638          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10639$as_echo "$tool_specified" >&6; }
10640        fi
10641      fi
10642    fi
10643
10644  fi
10645
10646
10647
10648  if test "x$RMDIR" = x; then
10649    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10650  fi
10651
10652
10653
10654
10655
10656  # Publish this variable in the help.
10657
10658
10659  if [ -z "${SH+x}" ]; then
10660    # The variable is not set by user, try to locate tool using the code snippet
10661    for ac_prog in sh
10662do
10663  # Extract the first word of "$ac_prog", so it can be a program name with args.
10664set dummy $ac_prog; ac_word=$2
10665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10666$as_echo_n "checking for $ac_word... " >&6; }
10667if ${ac_cv_path_SH+:} false; then :
10668  $as_echo_n "(cached) " >&6
10669else
10670  case $SH in
10671  [\\/]* | ?:[\\/]*)
10672  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10673  ;;
10674  *)
10675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10676for as_dir in $PATH
10677do
10678  IFS=$as_save_IFS
10679  test -z "$as_dir" && as_dir=.
10680    for ac_exec_ext in '' $ac_executable_extensions; do
10681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10682    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10684    break 2
10685  fi
10686done
10687  done
10688IFS=$as_save_IFS
10689
10690  ;;
10691esac
10692fi
10693SH=$ac_cv_path_SH
10694if test -n "$SH"; then
10695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10696$as_echo "$SH" >&6; }
10697else
10698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10699$as_echo "no" >&6; }
10700fi
10701
10702
10703  test -n "$SH" && break
10704done
10705
10706  else
10707    # The variable is set, but is it from the command line or the environment?
10708
10709    # Try to remove the string !SH! from our list.
10710    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10711    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10712      # If it failed, the variable was not from the command line. Ignore it,
10713      # but warn the user (except for BASH, which is always set by the calling BASH).
10714      if test "xSH" != xBASH; then
10715        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10716$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10717      fi
10718      # Try to locate tool using the code snippet
10719      for ac_prog in sh
10720do
10721  # Extract the first word of "$ac_prog", so it can be a program name with args.
10722set dummy $ac_prog; ac_word=$2
10723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10724$as_echo_n "checking for $ac_word... " >&6; }
10725if ${ac_cv_path_SH+:} false; then :
10726  $as_echo_n "(cached) " >&6
10727else
10728  case $SH in
10729  [\\/]* | ?:[\\/]*)
10730  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10731  ;;
10732  *)
10733  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10734for as_dir in $PATH
10735do
10736  IFS=$as_save_IFS
10737  test -z "$as_dir" && as_dir=.
10738    for ac_exec_ext in '' $ac_executable_extensions; do
10739  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10740    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10741    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10742    break 2
10743  fi
10744done
10745  done
10746IFS=$as_save_IFS
10747
10748  ;;
10749esac
10750fi
10751SH=$ac_cv_path_SH
10752if test -n "$SH"; then
10753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10754$as_echo "$SH" >&6; }
10755else
10756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10757$as_echo "no" >&6; }
10758fi
10759
10760
10761  test -n "$SH" && break
10762done
10763
10764    else
10765      # If it succeeded, then it was overridden by the user. We will use it
10766      # for the tool.
10767
10768      # First remove it from the list of overridden variables, so we can test
10769      # for unknown variables in the end.
10770      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10771
10772      # Check if we try to supply an empty value
10773      if test "x$SH" = x; then
10774        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10775$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10776        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10777$as_echo_n "checking for SH... " >&6; }
10778        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10779$as_echo "disabled" >&6; }
10780      else
10781        # Check if the provided tool contains a complete path.
10782        tool_specified="$SH"
10783        tool_basename="${tool_specified##*/}"
10784        if test "x$tool_basename" = "x$tool_specified"; then
10785          # A command without a complete path is provided, search $PATH.
10786          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10787$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10788          # Extract the first word of "$tool_basename", so it can be a program name with args.
10789set dummy $tool_basename; ac_word=$2
10790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10791$as_echo_n "checking for $ac_word... " >&6; }
10792if ${ac_cv_path_SH+:} false; then :
10793  $as_echo_n "(cached) " >&6
10794else
10795  case $SH in
10796  [\\/]* | ?:[\\/]*)
10797  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10798  ;;
10799  *)
10800  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10801for as_dir in $PATH
10802do
10803  IFS=$as_save_IFS
10804  test -z "$as_dir" && as_dir=.
10805    for ac_exec_ext in '' $ac_executable_extensions; do
10806  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10807    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10808    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10809    break 2
10810  fi
10811done
10812  done
10813IFS=$as_save_IFS
10814
10815  ;;
10816esac
10817fi
10818SH=$ac_cv_path_SH
10819if test -n "$SH"; then
10820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10821$as_echo "$SH" >&6; }
10822else
10823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10824$as_echo "no" >&6; }
10825fi
10826
10827
10828          if test "x$SH" = x; then
10829            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10830          fi
10831        else
10832          # Otherwise we believe it is a complete path. Use it as it is.
10833          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10834$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10835          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10836$as_echo_n "checking for SH... " >&6; }
10837          if test ! -x "$tool_specified"; then
10838            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10839$as_echo "not found" >&6; }
10840            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10841          fi
10842          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10843$as_echo "$tool_specified" >&6; }
10844        fi
10845      fi
10846    fi
10847
10848  fi
10849
10850
10851
10852  if test "x$SH" = x; then
10853    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10854  fi
10855
10856
10857
10858
10859
10860  # Publish this variable in the help.
10861
10862
10863  if [ -z "${SORT+x}" ]; then
10864    # The variable is not set by user, try to locate tool using the code snippet
10865    for ac_prog in sort
10866do
10867  # Extract the first word of "$ac_prog", so it can be a program name with args.
10868set dummy $ac_prog; ac_word=$2
10869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10870$as_echo_n "checking for $ac_word... " >&6; }
10871if ${ac_cv_path_SORT+:} false; then :
10872  $as_echo_n "(cached) " >&6
10873else
10874  case $SORT in
10875  [\\/]* | ?:[\\/]*)
10876  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10877  ;;
10878  *)
10879  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10880for as_dir in $PATH
10881do
10882  IFS=$as_save_IFS
10883  test -z "$as_dir" && as_dir=.
10884    for ac_exec_ext in '' $ac_executable_extensions; do
10885  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10886    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10887    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10888    break 2
10889  fi
10890done
10891  done
10892IFS=$as_save_IFS
10893
10894  ;;
10895esac
10896fi
10897SORT=$ac_cv_path_SORT
10898if test -n "$SORT"; then
10899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10900$as_echo "$SORT" >&6; }
10901else
10902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10903$as_echo "no" >&6; }
10904fi
10905
10906
10907  test -n "$SORT" && break
10908done
10909
10910  else
10911    # The variable is set, but is it from the command line or the environment?
10912
10913    # Try to remove the string !SORT! from our list.
10914    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10915    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10916      # If it failed, the variable was not from the command line. Ignore it,
10917      # but warn the user (except for BASH, which is always set by the calling BASH).
10918      if test "xSORT" != xBASH; then
10919        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10920$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10921      fi
10922      # Try to locate tool using the code snippet
10923      for ac_prog in sort
10924do
10925  # Extract the first word of "$ac_prog", so it can be a program name with args.
10926set dummy $ac_prog; ac_word=$2
10927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10928$as_echo_n "checking for $ac_word... " >&6; }
10929if ${ac_cv_path_SORT+:} false; then :
10930  $as_echo_n "(cached) " >&6
10931else
10932  case $SORT in
10933  [\\/]* | ?:[\\/]*)
10934  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10935  ;;
10936  *)
10937  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10938for as_dir in $PATH
10939do
10940  IFS=$as_save_IFS
10941  test -z "$as_dir" && as_dir=.
10942    for ac_exec_ext in '' $ac_executable_extensions; do
10943  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10944    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10946    break 2
10947  fi
10948done
10949  done
10950IFS=$as_save_IFS
10951
10952  ;;
10953esac
10954fi
10955SORT=$ac_cv_path_SORT
10956if test -n "$SORT"; then
10957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10958$as_echo "$SORT" >&6; }
10959else
10960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10961$as_echo "no" >&6; }
10962fi
10963
10964
10965  test -n "$SORT" && break
10966done
10967
10968    else
10969      # If it succeeded, then it was overridden by the user. We will use it
10970      # for the tool.
10971
10972      # First remove it from the list of overridden variables, so we can test
10973      # for unknown variables in the end.
10974      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10975
10976      # Check if we try to supply an empty value
10977      if test "x$SORT" = x; then
10978        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10979$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10980        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10981$as_echo_n "checking for SORT... " >&6; }
10982        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10983$as_echo "disabled" >&6; }
10984      else
10985        # Check if the provided tool contains a complete path.
10986        tool_specified="$SORT"
10987        tool_basename="${tool_specified##*/}"
10988        if test "x$tool_basename" = "x$tool_specified"; then
10989          # A command without a complete path is provided, search $PATH.
10990          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10991$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10992          # Extract the first word of "$tool_basename", so it can be a program name with args.
10993set dummy $tool_basename; ac_word=$2
10994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10995$as_echo_n "checking for $ac_word... " >&6; }
10996if ${ac_cv_path_SORT+:} false; then :
10997  $as_echo_n "(cached) " >&6
10998else
10999  case $SORT in
11000  [\\/]* | ?:[\\/]*)
11001  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11002  ;;
11003  *)
11004  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11005for as_dir in $PATH
11006do
11007  IFS=$as_save_IFS
11008  test -z "$as_dir" && as_dir=.
11009    for ac_exec_ext in '' $ac_executable_extensions; do
11010  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11011    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11013    break 2
11014  fi
11015done
11016  done
11017IFS=$as_save_IFS
11018
11019  ;;
11020esac
11021fi
11022SORT=$ac_cv_path_SORT
11023if test -n "$SORT"; then
11024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11025$as_echo "$SORT" >&6; }
11026else
11027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11028$as_echo "no" >&6; }
11029fi
11030
11031
11032          if test "x$SORT" = x; then
11033            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11034          fi
11035        else
11036          # Otherwise we believe it is a complete path. Use it as it is.
11037          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11038$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11039          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11040$as_echo_n "checking for SORT... " >&6; }
11041          if test ! -x "$tool_specified"; then
11042            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11043$as_echo "not found" >&6; }
11044            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11045          fi
11046          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11047$as_echo "$tool_specified" >&6; }
11048        fi
11049      fi
11050    fi
11051
11052  fi
11053
11054
11055
11056  if test "x$SORT" = x; then
11057    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11058  fi
11059
11060
11061
11062
11063
11064  # Publish this variable in the help.
11065
11066
11067  if [ -z "${TAIL+x}" ]; then
11068    # The variable is not set by user, try to locate tool using the code snippet
11069    for ac_prog in tail
11070do
11071  # Extract the first word of "$ac_prog", so it can be a program name with args.
11072set dummy $ac_prog; ac_word=$2
11073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11074$as_echo_n "checking for $ac_word... " >&6; }
11075if ${ac_cv_path_TAIL+:} false; then :
11076  $as_echo_n "(cached) " >&6
11077else
11078  case $TAIL in
11079  [\\/]* | ?:[\\/]*)
11080  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11081  ;;
11082  *)
11083  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11084for as_dir in $PATH
11085do
11086  IFS=$as_save_IFS
11087  test -z "$as_dir" && as_dir=.
11088    for ac_exec_ext in '' $ac_executable_extensions; do
11089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11090    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11092    break 2
11093  fi
11094done
11095  done
11096IFS=$as_save_IFS
11097
11098  ;;
11099esac
11100fi
11101TAIL=$ac_cv_path_TAIL
11102if test -n "$TAIL"; then
11103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11104$as_echo "$TAIL" >&6; }
11105else
11106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11107$as_echo "no" >&6; }
11108fi
11109
11110
11111  test -n "$TAIL" && break
11112done
11113
11114  else
11115    # The variable is set, but is it from the command line or the environment?
11116
11117    # Try to remove the string !TAIL! from our list.
11118    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11119    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11120      # If it failed, the variable was not from the command line. Ignore it,
11121      # but warn the user (except for BASH, which is always set by the calling BASH).
11122      if test "xTAIL" != xBASH; then
11123        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11124$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11125      fi
11126      # Try to locate tool using the code snippet
11127      for ac_prog in tail
11128do
11129  # Extract the first word of "$ac_prog", so it can be a program name with args.
11130set dummy $ac_prog; ac_word=$2
11131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11132$as_echo_n "checking for $ac_word... " >&6; }
11133if ${ac_cv_path_TAIL+:} false; then :
11134  $as_echo_n "(cached) " >&6
11135else
11136  case $TAIL in
11137  [\\/]* | ?:[\\/]*)
11138  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11139  ;;
11140  *)
11141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11142for as_dir in $PATH
11143do
11144  IFS=$as_save_IFS
11145  test -z "$as_dir" && as_dir=.
11146    for ac_exec_ext in '' $ac_executable_extensions; do
11147  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11148    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11150    break 2
11151  fi
11152done
11153  done
11154IFS=$as_save_IFS
11155
11156  ;;
11157esac
11158fi
11159TAIL=$ac_cv_path_TAIL
11160if test -n "$TAIL"; then
11161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11162$as_echo "$TAIL" >&6; }
11163else
11164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11165$as_echo "no" >&6; }
11166fi
11167
11168
11169  test -n "$TAIL" && break
11170done
11171
11172    else
11173      # If it succeeded, then it was overridden by the user. We will use it
11174      # for the tool.
11175
11176      # First remove it from the list of overridden variables, so we can test
11177      # for unknown variables in the end.
11178      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11179
11180      # Check if we try to supply an empty value
11181      if test "x$TAIL" = x; then
11182        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11183$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11184        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11185$as_echo_n "checking for TAIL... " >&6; }
11186        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11187$as_echo "disabled" >&6; }
11188      else
11189        # Check if the provided tool contains a complete path.
11190        tool_specified="$TAIL"
11191        tool_basename="${tool_specified##*/}"
11192        if test "x$tool_basename" = "x$tool_specified"; then
11193          # A command without a complete path is provided, search $PATH.
11194          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11195$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11196          # Extract the first word of "$tool_basename", so it can be a program name with args.
11197set dummy $tool_basename; ac_word=$2
11198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11199$as_echo_n "checking for $ac_word... " >&6; }
11200if ${ac_cv_path_TAIL+:} false; then :
11201  $as_echo_n "(cached) " >&6
11202else
11203  case $TAIL in
11204  [\\/]* | ?:[\\/]*)
11205  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11206  ;;
11207  *)
11208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11209for as_dir in $PATH
11210do
11211  IFS=$as_save_IFS
11212  test -z "$as_dir" && as_dir=.
11213    for ac_exec_ext in '' $ac_executable_extensions; do
11214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11215    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11217    break 2
11218  fi
11219done
11220  done
11221IFS=$as_save_IFS
11222
11223  ;;
11224esac
11225fi
11226TAIL=$ac_cv_path_TAIL
11227if test -n "$TAIL"; then
11228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11229$as_echo "$TAIL" >&6; }
11230else
11231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11232$as_echo "no" >&6; }
11233fi
11234
11235
11236          if test "x$TAIL" = x; then
11237            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11238          fi
11239        else
11240          # Otherwise we believe it is a complete path. Use it as it is.
11241          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11242$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11243          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11244$as_echo_n "checking for TAIL... " >&6; }
11245          if test ! -x "$tool_specified"; then
11246            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11247$as_echo "not found" >&6; }
11248            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11249          fi
11250          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11251$as_echo "$tool_specified" >&6; }
11252        fi
11253      fi
11254    fi
11255
11256  fi
11257
11258
11259
11260  if test "x$TAIL" = x; then
11261    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11262  fi
11263
11264
11265
11266
11267
11268  # Publish this variable in the help.
11269
11270
11271  if [ -z "${TAR+x}" ]; then
11272    # The variable is not set by user, try to locate tool using the code snippet
11273    for ac_prog in gtar tar
11274do
11275  # Extract the first word of "$ac_prog", so it can be a program name with args.
11276set dummy $ac_prog; ac_word=$2
11277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11278$as_echo_n "checking for $ac_word... " >&6; }
11279if ${ac_cv_path_TAR+:} false; then :
11280  $as_echo_n "(cached) " >&6
11281else
11282  case $TAR in
11283  [\\/]* | ?:[\\/]*)
11284  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11285  ;;
11286  *)
11287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11288for as_dir in $PATH
11289do
11290  IFS=$as_save_IFS
11291  test -z "$as_dir" && as_dir=.
11292    for ac_exec_ext in '' $ac_executable_extensions; do
11293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11294    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11296    break 2
11297  fi
11298done
11299  done
11300IFS=$as_save_IFS
11301
11302  ;;
11303esac
11304fi
11305TAR=$ac_cv_path_TAR
11306if test -n "$TAR"; then
11307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11308$as_echo "$TAR" >&6; }
11309else
11310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11311$as_echo "no" >&6; }
11312fi
11313
11314
11315  test -n "$TAR" && break
11316done
11317
11318  else
11319    # The variable is set, but is it from the command line or the environment?
11320
11321    # Try to remove the string !TAR! from our list.
11322    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11323    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11324      # If it failed, the variable was not from the command line. Ignore it,
11325      # but warn the user (except for BASH, which is always set by the calling BASH).
11326      if test "xTAR" != xBASH; then
11327        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11328$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11329      fi
11330      # Try to locate tool using the code snippet
11331      for ac_prog in gtar tar
11332do
11333  # Extract the first word of "$ac_prog", so it can be a program name with args.
11334set dummy $ac_prog; ac_word=$2
11335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11336$as_echo_n "checking for $ac_word... " >&6; }
11337if ${ac_cv_path_TAR+:} false; then :
11338  $as_echo_n "(cached) " >&6
11339else
11340  case $TAR in
11341  [\\/]* | ?:[\\/]*)
11342  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11343  ;;
11344  *)
11345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11346for as_dir in $PATH
11347do
11348  IFS=$as_save_IFS
11349  test -z "$as_dir" && as_dir=.
11350    for ac_exec_ext in '' $ac_executable_extensions; do
11351  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11352    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11354    break 2
11355  fi
11356done
11357  done
11358IFS=$as_save_IFS
11359
11360  ;;
11361esac
11362fi
11363TAR=$ac_cv_path_TAR
11364if test -n "$TAR"; then
11365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11366$as_echo "$TAR" >&6; }
11367else
11368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11369$as_echo "no" >&6; }
11370fi
11371
11372
11373  test -n "$TAR" && break
11374done
11375
11376    else
11377      # If it succeeded, then it was overridden by the user. We will use it
11378      # for the tool.
11379
11380      # First remove it from the list of overridden variables, so we can test
11381      # for unknown variables in the end.
11382      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11383
11384      # Check if we try to supply an empty value
11385      if test "x$TAR" = x; then
11386        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11387$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11388        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11389$as_echo_n "checking for TAR... " >&6; }
11390        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11391$as_echo "disabled" >&6; }
11392      else
11393        # Check if the provided tool contains a complete path.
11394        tool_specified="$TAR"
11395        tool_basename="${tool_specified##*/}"
11396        if test "x$tool_basename" = "x$tool_specified"; then
11397          # A command without a complete path is provided, search $PATH.
11398          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11399$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11400          # Extract the first word of "$tool_basename", so it can be a program name with args.
11401set dummy $tool_basename; ac_word=$2
11402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11403$as_echo_n "checking for $ac_word... " >&6; }
11404if ${ac_cv_path_TAR+:} false; then :
11405  $as_echo_n "(cached) " >&6
11406else
11407  case $TAR in
11408  [\\/]* | ?:[\\/]*)
11409  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11410  ;;
11411  *)
11412  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11413for as_dir in $PATH
11414do
11415  IFS=$as_save_IFS
11416  test -z "$as_dir" && as_dir=.
11417    for ac_exec_ext in '' $ac_executable_extensions; do
11418  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11419    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11420    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11421    break 2
11422  fi
11423done
11424  done
11425IFS=$as_save_IFS
11426
11427  ;;
11428esac
11429fi
11430TAR=$ac_cv_path_TAR
11431if test -n "$TAR"; then
11432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11433$as_echo "$TAR" >&6; }
11434else
11435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11436$as_echo "no" >&6; }
11437fi
11438
11439
11440          if test "x$TAR" = x; then
11441            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11442          fi
11443        else
11444          # Otherwise we believe it is a complete path. Use it as it is.
11445          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11446$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11447          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11448$as_echo_n "checking for TAR... " >&6; }
11449          if test ! -x "$tool_specified"; then
11450            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11451$as_echo "not found" >&6; }
11452            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11453          fi
11454          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11455$as_echo "$tool_specified" >&6; }
11456        fi
11457      fi
11458    fi
11459
11460  fi
11461
11462
11463
11464  if test "x$TAR" = x; then
11465    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11466  fi
11467
11468
11469
11470
11471
11472  # Publish this variable in the help.
11473
11474
11475  if [ -z "${TEE+x}" ]; then
11476    # The variable is not set by user, try to locate tool using the code snippet
11477    for ac_prog in tee
11478do
11479  # Extract the first word of "$ac_prog", so it can be a program name with args.
11480set dummy $ac_prog; ac_word=$2
11481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11482$as_echo_n "checking for $ac_word... " >&6; }
11483if ${ac_cv_path_TEE+:} false; then :
11484  $as_echo_n "(cached) " >&6
11485else
11486  case $TEE in
11487  [\\/]* | ?:[\\/]*)
11488  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11489  ;;
11490  *)
11491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11492for as_dir in $PATH
11493do
11494  IFS=$as_save_IFS
11495  test -z "$as_dir" && as_dir=.
11496    for ac_exec_ext in '' $ac_executable_extensions; do
11497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11498    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11500    break 2
11501  fi
11502done
11503  done
11504IFS=$as_save_IFS
11505
11506  ;;
11507esac
11508fi
11509TEE=$ac_cv_path_TEE
11510if test -n "$TEE"; then
11511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11512$as_echo "$TEE" >&6; }
11513else
11514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11515$as_echo "no" >&6; }
11516fi
11517
11518
11519  test -n "$TEE" && break
11520done
11521
11522  else
11523    # The variable is set, but is it from the command line or the environment?
11524
11525    # Try to remove the string !TEE! from our list.
11526    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11527    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11528      # If it failed, the variable was not from the command line. Ignore it,
11529      # but warn the user (except for BASH, which is always set by the calling BASH).
11530      if test "xTEE" != xBASH; then
11531        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11532$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11533      fi
11534      # Try to locate tool using the code snippet
11535      for ac_prog in tee
11536do
11537  # Extract the first word of "$ac_prog", so it can be a program name with args.
11538set dummy $ac_prog; ac_word=$2
11539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11540$as_echo_n "checking for $ac_word... " >&6; }
11541if ${ac_cv_path_TEE+:} false; then :
11542  $as_echo_n "(cached) " >&6
11543else
11544  case $TEE in
11545  [\\/]* | ?:[\\/]*)
11546  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11547  ;;
11548  *)
11549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11550for as_dir in $PATH
11551do
11552  IFS=$as_save_IFS
11553  test -z "$as_dir" && as_dir=.
11554    for ac_exec_ext in '' $ac_executable_extensions; do
11555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11556    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11558    break 2
11559  fi
11560done
11561  done
11562IFS=$as_save_IFS
11563
11564  ;;
11565esac
11566fi
11567TEE=$ac_cv_path_TEE
11568if test -n "$TEE"; then
11569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11570$as_echo "$TEE" >&6; }
11571else
11572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11573$as_echo "no" >&6; }
11574fi
11575
11576
11577  test -n "$TEE" && break
11578done
11579
11580    else
11581      # If it succeeded, then it was overridden by the user. We will use it
11582      # for the tool.
11583
11584      # First remove it from the list of overridden variables, so we can test
11585      # for unknown variables in the end.
11586      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11587
11588      # Check if we try to supply an empty value
11589      if test "x$TEE" = x; then
11590        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11591$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11592        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11593$as_echo_n "checking for TEE... " >&6; }
11594        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11595$as_echo "disabled" >&6; }
11596      else
11597        # Check if the provided tool contains a complete path.
11598        tool_specified="$TEE"
11599        tool_basename="${tool_specified##*/}"
11600        if test "x$tool_basename" = "x$tool_specified"; then
11601          # A command without a complete path is provided, search $PATH.
11602          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11603$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11604          # Extract the first word of "$tool_basename", so it can be a program name with args.
11605set dummy $tool_basename; ac_word=$2
11606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11607$as_echo_n "checking for $ac_word... " >&6; }
11608if ${ac_cv_path_TEE+:} false; then :
11609  $as_echo_n "(cached) " >&6
11610else
11611  case $TEE in
11612  [\\/]* | ?:[\\/]*)
11613  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11614  ;;
11615  *)
11616  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11617for as_dir in $PATH
11618do
11619  IFS=$as_save_IFS
11620  test -z "$as_dir" && as_dir=.
11621    for ac_exec_ext in '' $ac_executable_extensions; do
11622  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11623    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11625    break 2
11626  fi
11627done
11628  done
11629IFS=$as_save_IFS
11630
11631  ;;
11632esac
11633fi
11634TEE=$ac_cv_path_TEE
11635if test -n "$TEE"; then
11636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11637$as_echo "$TEE" >&6; }
11638else
11639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11640$as_echo "no" >&6; }
11641fi
11642
11643
11644          if test "x$TEE" = x; then
11645            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11646          fi
11647        else
11648          # Otherwise we believe it is a complete path. Use it as it is.
11649          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11650$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11651          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11652$as_echo_n "checking for TEE... " >&6; }
11653          if test ! -x "$tool_specified"; then
11654            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11655$as_echo "not found" >&6; }
11656            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11657          fi
11658          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11659$as_echo "$tool_specified" >&6; }
11660        fi
11661      fi
11662    fi
11663
11664  fi
11665
11666
11667
11668  if test "x$TEE" = x; then
11669    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11670  fi
11671
11672
11673
11674
11675
11676  # Publish this variable in the help.
11677
11678
11679  if [ -z "${TOUCH+x}" ]; then
11680    # The variable is not set by user, try to locate tool using the code snippet
11681    for ac_prog in touch
11682do
11683  # Extract the first word of "$ac_prog", so it can be a program name with args.
11684set dummy $ac_prog; ac_word=$2
11685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11686$as_echo_n "checking for $ac_word... " >&6; }
11687if ${ac_cv_path_TOUCH+:} false; then :
11688  $as_echo_n "(cached) " >&6
11689else
11690  case $TOUCH in
11691  [\\/]* | ?:[\\/]*)
11692  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11693  ;;
11694  *)
11695  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11696for as_dir in $PATH
11697do
11698  IFS=$as_save_IFS
11699  test -z "$as_dir" && as_dir=.
11700    for ac_exec_ext in '' $ac_executable_extensions; do
11701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11702    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11704    break 2
11705  fi
11706done
11707  done
11708IFS=$as_save_IFS
11709
11710  ;;
11711esac
11712fi
11713TOUCH=$ac_cv_path_TOUCH
11714if test -n "$TOUCH"; then
11715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11716$as_echo "$TOUCH" >&6; }
11717else
11718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11719$as_echo "no" >&6; }
11720fi
11721
11722
11723  test -n "$TOUCH" && break
11724done
11725
11726  else
11727    # The variable is set, but is it from the command line or the environment?
11728
11729    # Try to remove the string !TOUCH! from our list.
11730    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11731    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11732      # If it failed, the variable was not from the command line. Ignore it,
11733      # but warn the user (except for BASH, which is always set by the calling BASH).
11734      if test "xTOUCH" != xBASH; then
11735        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11736$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11737      fi
11738      # Try to locate tool using the code snippet
11739      for ac_prog in touch
11740do
11741  # Extract the first word of "$ac_prog", so it can be a program name with args.
11742set dummy $ac_prog; ac_word=$2
11743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11744$as_echo_n "checking for $ac_word... " >&6; }
11745if ${ac_cv_path_TOUCH+:} false; then :
11746  $as_echo_n "(cached) " >&6
11747else
11748  case $TOUCH in
11749  [\\/]* | ?:[\\/]*)
11750  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11751  ;;
11752  *)
11753  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11754for as_dir in $PATH
11755do
11756  IFS=$as_save_IFS
11757  test -z "$as_dir" && as_dir=.
11758    for ac_exec_ext in '' $ac_executable_extensions; do
11759  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11760    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11762    break 2
11763  fi
11764done
11765  done
11766IFS=$as_save_IFS
11767
11768  ;;
11769esac
11770fi
11771TOUCH=$ac_cv_path_TOUCH
11772if test -n "$TOUCH"; then
11773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11774$as_echo "$TOUCH" >&6; }
11775else
11776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11777$as_echo "no" >&6; }
11778fi
11779
11780
11781  test -n "$TOUCH" && break
11782done
11783
11784    else
11785      # If it succeeded, then it was overridden by the user. We will use it
11786      # for the tool.
11787
11788      # First remove it from the list of overridden variables, so we can test
11789      # for unknown variables in the end.
11790      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11791
11792      # Check if we try to supply an empty value
11793      if test "x$TOUCH" = x; then
11794        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11795$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11796        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11797$as_echo_n "checking for TOUCH... " >&6; }
11798        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11799$as_echo "disabled" >&6; }
11800      else
11801        # Check if the provided tool contains a complete path.
11802        tool_specified="$TOUCH"
11803        tool_basename="${tool_specified##*/}"
11804        if test "x$tool_basename" = "x$tool_specified"; then
11805          # A command without a complete path is provided, search $PATH.
11806          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11807$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11808          # Extract the first word of "$tool_basename", so it can be a program name with args.
11809set dummy $tool_basename; ac_word=$2
11810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11811$as_echo_n "checking for $ac_word... " >&6; }
11812if ${ac_cv_path_TOUCH+:} false; then :
11813  $as_echo_n "(cached) " >&6
11814else
11815  case $TOUCH in
11816  [\\/]* | ?:[\\/]*)
11817  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11818  ;;
11819  *)
11820  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11821for as_dir in $PATH
11822do
11823  IFS=$as_save_IFS
11824  test -z "$as_dir" && as_dir=.
11825    for ac_exec_ext in '' $ac_executable_extensions; do
11826  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11827    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11828    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11829    break 2
11830  fi
11831done
11832  done
11833IFS=$as_save_IFS
11834
11835  ;;
11836esac
11837fi
11838TOUCH=$ac_cv_path_TOUCH
11839if test -n "$TOUCH"; then
11840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11841$as_echo "$TOUCH" >&6; }
11842else
11843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11844$as_echo "no" >&6; }
11845fi
11846
11847
11848          if test "x$TOUCH" = x; then
11849            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11850          fi
11851        else
11852          # Otherwise we believe it is a complete path. Use it as it is.
11853          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11854$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11855          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11856$as_echo_n "checking for TOUCH... " >&6; }
11857          if test ! -x "$tool_specified"; then
11858            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11859$as_echo "not found" >&6; }
11860            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11861          fi
11862          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11863$as_echo "$tool_specified" >&6; }
11864        fi
11865      fi
11866    fi
11867
11868  fi
11869
11870
11871
11872  if test "x$TOUCH" = x; then
11873    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11874  fi
11875
11876
11877
11878
11879
11880  # Publish this variable in the help.
11881
11882
11883  if [ -z "${TR+x}" ]; then
11884    # The variable is not set by user, try to locate tool using the code snippet
11885    for ac_prog in tr
11886do
11887  # Extract the first word of "$ac_prog", so it can be a program name with args.
11888set dummy $ac_prog; ac_word=$2
11889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11890$as_echo_n "checking for $ac_word... " >&6; }
11891if ${ac_cv_path_TR+:} false; then :
11892  $as_echo_n "(cached) " >&6
11893else
11894  case $TR in
11895  [\\/]* | ?:[\\/]*)
11896  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11897  ;;
11898  *)
11899  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11900for as_dir in $PATH
11901do
11902  IFS=$as_save_IFS
11903  test -z "$as_dir" && as_dir=.
11904    for ac_exec_ext in '' $ac_executable_extensions; do
11905  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11906    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11908    break 2
11909  fi
11910done
11911  done
11912IFS=$as_save_IFS
11913
11914  ;;
11915esac
11916fi
11917TR=$ac_cv_path_TR
11918if test -n "$TR"; then
11919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11920$as_echo "$TR" >&6; }
11921else
11922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11923$as_echo "no" >&6; }
11924fi
11925
11926
11927  test -n "$TR" && break
11928done
11929
11930  else
11931    # The variable is set, but is it from the command line or the environment?
11932
11933    # Try to remove the string !TR! from our list.
11934    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11935    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11936      # If it failed, the variable was not from the command line. Ignore it,
11937      # but warn the user (except for BASH, which is always set by the calling BASH).
11938      if test "xTR" != xBASH; then
11939        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11940$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11941      fi
11942      # Try to locate tool using the code snippet
11943      for ac_prog in tr
11944do
11945  # Extract the first word of "$ac_prog", so it can be a program name with args.
11946set dummy $ac_prog; ac_word=$2
11947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11948$as_echo_n "checking for $ac_word... " >&6; }
11949if ${ac_cv_path_TR+:} false; then :
11950  $as_echo_n "(cached) " >&6
11951else
11952  case $TR in
11953  [\\/]* | ?:[\\/]*)
11954  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11955  ;;
11956  *)
11957  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11958for as_dir in $PATH
11959do
11960  IFS=$as_save_IFS
11961  test -z "$as_dir" && as_dir=.
11962    for ac_exec_ext in '' $ac_executable_extensions; do
11963  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11964    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11965    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11966    break 2
11967  fi
11968done
11969  done
11970IFS=$as_save_IFS
11971
11972  ;;
11973esac
11974fi
11975TR=$ac_cv_path_TR
11976if test -n "$TR"; then
11977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11978$as_echo "$TR" >&6; }
11979else
11980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11981$as_echo "no" >&6; }
11982fi
11983
11984
11985  test -n "$TR" && break
11986done
11987
11988    else
11989      # If it succeeded, then it was overridden by the user. We will use it
11990      # for the tool.
11991
11992      # First remove it from the list of overridden variables, so we can test
11993      # for unknown variables in the end.
11994      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11995
11996      # Check if we try to supply an empty value
11997      if test "x$TR" = x; then
11998        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11999$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12000        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12001$as_echo_n "checking for TR... " >&6; }
12002        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12003$as_echo "disabled" >&6; }
12004      else
12005        # Check if the provided tool contains a complete path.
12006        tool_specified="$TR"
12007        tool_basename="${tool_specified##*/}"
12008        if test "x$tool_basename" = "x$tool_specified"; then
12009          # A command without a complete path is provided, search $PATH.
12010          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12011$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12012          # Extract the first word of "$tool_basename", so it can be a program name with args.
12013set dummy $tool_basename; ac_word=$2
12014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12015$as_echo_n "checking for $ac_word... " >&6; }
12016if ${ac_cv_path_TR+:} false; then :
12017  $as_echo_n "(cached) " >&6
12018else
12019  case $TR in
12020  [\\/]* | ?:[\\/]*)
12021  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12022  ;;
12023  *)
12024  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12025for as_dir in $PATH
12026do
12027  IFS=$as_save_IFS
12028  test -z "$as_dir" && as_dir=.
12029    for ac_exec_ext in '' $ac_executable_extensions; do
12030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12031    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12033    break 2
12034  fi
12035done
12036  done
12037IFS=$as_save_IFS
12038
12039  ;;
12040esac
12041fi
12042TR=$ac_cv_path_TR
12043if test -n "$TR"; then
12044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12045$as_echo "$TR" >&6; }
12046else
12047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12048$as_echo "no" >&6; }
12049fi
12050
12051
12052          if test "x$TR" = x; then
12053            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12054          fi
12055        else
12056          # Otherwise we believe it is a complete path. Use it as it is.
12057          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12058$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12059          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12060$as_echo_n "checking for TR... " >&6; }
12061          if test ! -x "$tool_specified"; then
12062            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12063$as_echo "not found" >&6; }
12064            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12065          fi
12066          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12067$as_echo "$tool_specified" >&6; }
12068        fi
12069      fi
12070    fi
12071
12072  fi
12073
12074
12075
12076  if test "x$TR" = x; then
12077    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12078  fi
12079
12080
12081
12082
12083
12084  # Publish this variable in the help.
12085
12086
12087  if [ -z "${UNAME+x}" ]; then
12088    # The variable is not set by user, try to locate tool using the code snippet
12089    for ac_prog in uname
12090do
12091  # Extract the first word of "$ac_prog", so it can be a program name with args.
12092set dummy $ac_prog; ac_word=$2
12093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12094$as_echo_n "checking for $ac_word... " >&6; }
12095if ${ac_cv_path_UNAME+:} false; then :
12096  $as_echo_n "(cached) " >&6
12097else
12098  case $UNAME in
12099  [\\/]* | ?:[\\/]*)
12100  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12101  ;;
12102  *)
12103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12104for as_dir in $PATH
12105do
12106  IFS=$as_save_IFS
12107  test -z "$as_dir" && as_dir=.
12108    for ac_exec_ext in '' $ac_executable_extensions; do
12109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12110    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12112    break 2
12113  fi
12114done
12115  done
12116IFS=$as_save_IFS
12117
12118  ;;
12119esac
12120fi
12121UNAME=$ac_cv_path_UNAME
12122if test -n "$UNAME"; then
12123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12124$as_echo "$UNAME" >&6; }
12125else
12126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12127$as_echo "no" >&6; }
12128fi
12129
12130
12131  test -n "$UNAME" && break
12132done
12133
12134  else
12135    # The variable is set, but is it from the command line or the environment?
12136
12137    # Try to remove the string !UNAME! from our list.
12138    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12139    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12140      # If it failed, the variable was not from the command line. Ignore it,
12141      # but warn the user (except for BASH, which is always set by the calling BASH).
12142      if test "xUNAME" != xBASH; then
12143        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12144$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12145      fi
12146      # Try to locate tool using the code snippet
12147      for ac_prog in uname
12148do
12149  # Extract the first word of "$ac_prog", so it can be a program name with args.
12150set dummy $ac_prog; ac_word=$2
12151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12152$as_echo_n "checking for $ac_word... " >&6; }
12153if ${ac_cv_path_UNAME+:} false; then :
12154  $as_echo_n "(cached) " >&6
12155else
12156  case $UNAME in
12157  [\\/]* | ?:[\\/]*)
12158  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12159  ;;
12160  *)
12161  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12162for as_dir in $PATH
12163do
12164  IFS=$as_save_IFS
12165  test -z "$as_dir" && as_dir=.
12166    for ac_exec_ext in '' $ac_executable_extensions; do
12167  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12168    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12169    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12170    break 2
12171  fi
12172done
12173  done
12174IFS=$as_save_IFS
12175
12176  ;;
12177esac
12178fi
12179UNAME=$ac_cv_path_UNAME
12180if test -n "$UNAME"; then
12181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12182$as_echo "$UNAME" >&6; }
12183else
12184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12185$as_echo "no" >&6; }
12186fi
12187
12188
12189  test -n "$UNAME" && break
12190done
12191
12192    else
12193      # If it succeeded, then it was overridden by the user. We will use it
12194      # for the tool.
12195
12196      # First remove it from the list of overridden variables, so we can test
12197      # for unknown variables in the end.
12198      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12199
12200      # Check if we try to supply an empty value
12201      if test "x$UNAME" = x; then
12202        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12203$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12204        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12205$as_echo_n "checking for UNAME... " >&6; }
12206        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12207$as_echo "disabled" >&6; }
12208      else
12209        # Check if the provided tool contains a complete path.
12210        tool_specified="$UNAME"
12211        tool_basename="${tool_specified##*/}"
12212        if test "x$tool_basename" = "x$tool_specified"; then
12213          # A command without a complete path is provided, search $PATH.
12214          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12215$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12216          # Extract the first word of "$tool_basename", so it can be a program name with args.
12217set dummy $tool_basename; ac_word=$2
12218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12219$as_echo_n "checking for $ac_word... " >&6; }
12220if ${ac_cv_path_UNAME+:} false; then :
12221  $as_echo_n "(cached) " >&6
12222else
12223  case $UNAME in
12224  [\\/]* | ?:[\\/]*)
12225  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12226  ;;
12227  *)
12228  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12229for as_dir in $PATH
12230do
12231  IFS=$as_save_IFS
12232  test -z "$as_dir" && as_dir=.
12233    for ac_exec_ext in '' $ac_executable_extensions; do
12234  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12235    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12236    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12237    break 2
12238  fi
12239done
12240  done
12241IFS=$as_save_IFS
12242
12243  ;;
12244esac
12245fi
12246UNAME=$ac_cv_path_UNAME
12247if test -n "$UNAME"; then
12248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12249$as_echo "$UNAME" >&6; }
12250else
12251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12252$as_echo "no" >&6; }
12253fi
12254
12255
12256          if test "x$UNAME" = x; then
12257            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12258          fi
12259        else
12260          # Otherwise we believe it is a complete path. Use it as it is.
12261          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12262$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12263          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12264$as_echo_n "checking for UNAME... " >&6; }
12265          if test ! -x "$tool_specified"; then
12266            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12267$as_echo "not found" >&6; }
12268            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12269          fi
12270          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12271$as_echo "$tool_specified" >&6; }
12272        fi
12273      fi
12274    fi
12275
12276  fi
12277
12278
12279
12280  if test "x$UNAME" = x; then
12281    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12282  fi
12283
12284
12285
12286
12287
12288  # Publish this variable in the help.
12289
12290
12291  if [ -z "${UNIQ+x}" ]; then
12292    # The variable is not set by user, try to locate tool using the code snippet
12293    for ac_prog in uniq
12294do
12295  # Extract the first word of "$ac_prog", so it can be a program name with args.
12296set dummy $ac_prog; ac_word=$2
12297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12298$as_echo_n "checking for $ac_word... " >&6; }
12299if ${ac_cv_path_UNIQ+:} false; then :
12300  $as_echo_n "(cached) " >&6
12301else
12302  case $UNIQ in
12303  [\\/]* | ?:[\\/]*)
12304  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12305  ;;
12306  *)
12307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12308for as_dir in $PATH
12309do
12310  IFS=$as_save_IFS
12311  test -z "$as_dir" && as_dir=.
12312    for ac_exec_ext in '' $ac_executable_extensions; do
12313  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12314    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12316    break 2
12317  fi
12318done
12319  done
12320IFS=$as_save_IFS
12321
12322  ;;
12323esac
12324fi
12325UNIQ=$ac_cv_path_UNIQ
12326if test -n "$UNIQ"; then
12327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12328$as_echo "$UNIQ" >&6; }
12329else
12330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12331$as_echo "no" >&6; }
12332fi
12333
12334
12335  test -n "$UNIQ" && break
12336done
12337
12338  else
12339    # The variable is set, but is it from the command line or the environment?
12340
12341    # Try to remove the string !UNIQ! from our list.
12342    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12343    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12344      # If it failed, the variable was not from the command line. Ignore it,
12345      # but warn the user (except for BASH, which is always set by the calling BASH).
12346      if test "xUNIQ" != xBASH; then
12347        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12348$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12349      fi
12350      # Try to locate tool using the code snippet
12351      for ac_prog in uniq
12352do
12353  # Extract the first word of "$ac_prog", so it can be a program name with args.
12354set dummy $ac_prog; ac_word=$2
12355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12356$as_echo_n "checking for $ac_word... " >&6; }
12357if ${ac_cv_path_UNIQ+:} false; then :
12358  $as_echo_n "(cached) " >&6
12359else
12360  case $UNIQ in
12361  [\\/]* | ?:[\\/]*)
12362  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12363  ;;
12364  *)
12365  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12366for as_dir in $PATH
12367do
12368  IFS=$as_save_IFS
12369  test -z "$as_dir" && as_dir=.
12370    for ac_exec_ext in '' $ac_executable_extensions; do
12371  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12372    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12374    break 2
12375  fi
12376done
12377  done
12378IFS=$as_save_IFS
12379
12380  ;;
12381esac
12382fi
12383UNIQ=$ac_cv_path_UNIQ
12384if test -n "$UNIQ"; then
12385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12386$as_echo "$UNIQ" >&6; }
12387else
12388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12389$as_echo "no" >&6; }
12390fi
12391
12392
12393  test -n "$UNIQ" && break
12394done
12395
12396    else
12397      # If it succeeded, then it was overridden by the user. We will use it
12398      # for the tool.
12399
12400      # First remove it from the list of overridden variables, so we can test
12401      # for unknown variables in the end.
12402      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12403
12404      # Check if we try to supply an empty value
12405      if test "x$UNIQ" = x; then
12406        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12407$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12408        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12409$as_echo_n "checking for UNIQ... " >&6; }
12410        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12411$as_echo "disabled" >&6; }
12412      else
12413        # Check if the provided tool contains a complete path.
12414        tool_specified="$UNIQ"
12415        tool_basename="${tool_specified##*/}"
12416        if test "x$tool_basename" = "x$tool_specified"; then
12417          # A command without a complete path is provided, search $PATH.
12418          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12419$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12420          # Extract the first word of "$tool_basename", so it can be a program name with args.
12421set dummy $tool_basename; ac_word=$2
12422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12423$as_echo_n "checking for $ac_word... " >&6; }
12424if ${ac_cv_path_UNIQ+:} false; then :
12425  $as_echo_n "(cached) " >&6
12426else
12427  case $UNIQ in
12428  [\\/]* | ?:[\\/]*)
12429  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12430  ;;
12431  *)
12432  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12433for as_dir in $PATH
12434do
12435  IFS=$as_save_IFS
12436  test -z "$as_dir" && as_dir=.
12437    for ac_exec_ext in '' $ac_executable_extensions; do
12438  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12439    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12441    break 2
12442  fi
12443done
12444  done
12445IFS=$as_save_IFS
12446
12447  ;;
12448esac
12449fi
12450UNIQ=$ac_cv_path_UNIQ
12451if test -n "$UNIQ"; then
12452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12453$as_echo "$UNIQ" >&6; }
12454else
12455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12456$as_echo "no" >&6; }
12457fi
12458
12459
12460          if test "x$UNIQ" = x; then
12461            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12462          fi
12463        else
12464          # Otherwise we believe it is a complete path. Use it as it is.
12465          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12466$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12467          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12468$as_echo_n "checking for UNIQ... " >&6; }
12469          if test ! -x "$tool_specified"; then
12470            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12471$as_echo "not found" >&6; }
12472            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12473          fi
12474          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12475$as_echo "$tool_specified" >&6; }
12476        fi
12477      fi
12478    fi
12479
12480  fi
12481
12482
12483
12484  if test "x$UNIQ" = x; then
12485    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12486  fi
12487
12488
12489
12490
12491
12492  # Publish this variable in the help.
12493
12494
12495  if [ -z "${WC+x}" ]; then
12496    # The variable is not set by user, try to locate tool using the code snippet
12497    for ac_prog in wc
12498do
12499  # Extract the first word of "$ac_prog", so it can be a program name with args.
12500set dummy $ac_prog; ac_word=$2
12501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12502$as_echo_n "checking for $ac_word... " >&6; }
12503if ${ac_cv_path_WC+:} false; then :
12504  $as_echo_n "(cached) " >&6
12505else
12506  case $WC in
12507  [\\/]* | ?:[\\/]*)
12508  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12509  ;;
12510  *)
12511  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12512for as_dir in $PATH
12513do
12514  IFS=$as_save_IFS
12515  test -z "$as_dir" && as_dir=.
12516    for ac_exec_ext in '' $ac_executable_extensions; do
12517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12518    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12520    break 2
12521  fi
12522done
12523  done
12524IFS=$as_save_IFS
12525
12526  ;;
12527esac
12528fi
12529WC=$ac_cv_path_WC
12530if test -n "$WC"; then
12531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12532$as_echo "$WC" >&6; }
12533else
12534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12535$as_echo "no" >&6; }
12536fi
12537
12538
12539  test -n "$WC" && break
12540done
12541
12542  else
12543    # The variable is set, but is it from the command line or the environment?
12544
12545    # Try to remove the string !WC! from our list.
12546    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12547    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12548      # If it failed, the variable was not from the command line. Ignore it,
12549      # but warn the user (except for BASH, which is always set by the calling BASH).
12550      if test "xWC" != xBASH; then
12551        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12552$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12553      fi
12554      # Try to locate tool using the code snippet
12555      for ac_prog in wc
12556do
12557  # Extract the first word of "$ac_prog", so it can be a program name with args.
12558set dummy $ac_prog; ac_word=$2
12559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12560$as_echo_n "checking for $ac_word... " >&6; }
12561if ${ac_cv_path_WC+:} false; then :
12562  $as_echo_n "(cached) " >&6
12563else
12564  case $WC in
12565  [\\/]* | ?:[\\/]*)
12566  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12567  ;;
12568  *)
12569  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12570for as_dir in $PATH
12571do
12572  IFS=$as_save_IFS
12573  test -z "$as_dir" && as_dir=.
12574    for ac_exec_ext in '' $ac_executable_extensions; do
12575  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12576    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12578    break 2
12579  fi
12580done
12581  done
12582IFS=$as_save_IFS
12583
12584  ;;
12585esac
12586fi
12587WC=$ac_cv_path_WC
12588if test -n "$WC"; then
12589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12590$as_echo "$WC" >&6; }
12591else
12592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12593$as_echo "no" >&6; }
12594fi
12595
12596
12597  test -n "$WC" && break
12598done
12599
12600    else
12601      # If it succeeded, then it was overridden by the user. We will use it
12602      # for the tool.
12603
12604      # First remove it from the list of overridden variables, so we can test
12605      # for unknown variables in the end.
12606      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12607
12608      # Check if we try to supply an empty value
12609      if test "x$WC" = x; then
12610        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12611$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12612        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12613$as_echo_n "checking for WC... " >&6; }
12614        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12615$as_echo "disabled" >&6; }
12616      else
12617        # Check if the provided tool contains a complete path.
12618        tool_specified="$WC"
12619        tool_basename="${tool_specified##*/}"
12620        if test "x$tool_basename" = "x$tool_specified"; then
12621          # A command without a complete path is provided, search $PATH.
12622          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12623$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12624          # Extract the first word of "$tool_basename", so it can be a program name with args.
12625set dummy $tool_basename; ac_word=$2
12626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12627$as_echo_n "checking for $ac_word... " >&6; }
12628if ${ac_cv_path_WC+:} false; then :
12629  $as_echo_n "(cached) " >&6
12630else
12631  case $WC in
12632  [\\/]* | ?:[\\/]*)
12633  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12634  ;;
12635  *)
12636  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12637for as_dir in $PATH
12638do
12639  IFS=$as_save_IFS
12640  test -z "$as_dir" && as_dir=.
12641    for ac_exec_ext in '' $ac_executable_extensions; do
12642  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12643    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12645    break 2
12646  fi
12647done
12648  done
12649IFS=$as_save_IFS
12650
12651  ;;
12652esac
12653fi
12654WC=$ac_cv_path_WC
12655if test -n "$WC"; then
12656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12657$as_echo "$WC" >&6; }
12658else
12659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12660$as_echo "no" >&6; }
12661fi
12662
12663
12664          if test "x$WC" = x; then
12665            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12666          fi
12667        else
12668          # Otherwise we believe it is a complete path. Use it as it is.
12669          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12670$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12671          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12672$as_echo_n "checking for WC... " >&6; }
12673          if test ! -x "$tool_specified"; then
12674            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12675$as_echo "not found" >&6; }
12676            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12677          fi
12678          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12679$as_echo "$tool_specified" >&6; }
12680        fi
12681      fi
12682    fi
12683
12684  fi
12685
12686
12687
12688  if test "x$WC" = x; then
12689    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12690  fi
12691
12692
12693
12694
12695
12696  # Publish this variable in the help.
12697
12698
12699  if [ -z "${WHICH+x}" ]; then
12700    # The variable is not set by user, try to locate tool using the code snippet
12701    for ac_prog in which
12702do
12703  # Extract the first word of "$ac_prog", so it can be a program name with args.
12704set dummy $ac_prog; ac_word=$2
12705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12706$as_echo_n "checking for $ac_word... " >&6; }
12707if ${ac_cv_path_WHICH+:} false; then :
12708  $as_echo_n "(cached) " >&6
12709else
12710  case $WHICH in
12711  [\\/]* | ?:[\\/]*)
12712  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12713  ;;
12714  *)
12715  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12716for as_dir in $PATH
12717do
12718  IFS=$as_save_IFS
12719  test -z "$as_dir" && as_dir=.
12720    for ac_exec_ext in '' $ac_executable_extensions; do
12721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12722    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12724    break 2
12725  fi
12726done
12727  done
12728IFS=$as_save_IFS
12729
12730  ;;
12731esac
12732fi
12733WHICH=$ac_cv_path_WHICH
12734if test -n "$WHICH"; then
12735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12736$as_echo "$WHICH" >&6; }
12737else
12738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12739$as_echo "no" >&6; }
12740fi
12741
12742
12743  test -n "$WHICH" && break
12744done
12745
12746  else
12747    # The variable is set, but is it from the command line or the environment?
12748
12749    # Try to remove the string !WHICH! from our list.
12750    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12751    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12752      # If it failed, the variable was not from the command line. Ignore it,
12753      # but warn the user (except for BASH, which is always set by the calling BASH).
12754      if test "xWHICH" != xBASH; then
12755        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12756$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12757      fi
12758      # Try to locate tool using the code snippet
12759      for ac_prog in which
12760do
12761  # Extract the first word of "$ac_prog", so it can be a program name with args.
12762set dummy $ac_prog; ac_word=$2
12763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12764$as_echo_n "checking for $ac_word... " >&6; }
12765if ${ac_cv_path_WHICH+:} false; then :
12766  $as_echo_n "(cached) " >&6
12767else
12768  case $WHICH in
12769  [\\/]* | ?:[\\/]*)
12770  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12771  ;;
12772  *)
12773  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12774for as_dir in $PATH
12775do
12776  IFS=$as_save_IFS
12777  test -z "$as_dir" && as_dir=.
12778    for ac_exec_ext in '' $ac_executable_extensions; do
12779  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12780    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12781    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12782    break 2
12783  fi
12784done
12785  done
12786IFS=$as_save_IFS
12787
12788  ;;
12789esac
12790fi
12791WHICH=$ac_cv_path_WHICH
12792if test -n "$WHICH"; then
12793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12794$as_echo "$WHICH" >&6; }
12795else
12796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12797$as_echo "no" >&6; }
12798fi
12799
12800
12801  test -n "$WHICH" && break
12802done
12803
12804    else
12805      # If it succeeded, then it was overridden by the user. We will use it
12806      # for the tool.
12807
12808      # First remove it from the list of overridden variables, so we can test
12809      # for unknown variables in the end.
12810      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12811
12812      # Check if we try to supply an empty value
12813      if test "x$WHICH" = x; then
12814        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12815$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12816        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12817$as_echo_n "checking for WHICH... " >&6; }
12818        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12819$as_echo "disabled" >&6; }
12820      else
12821        # Check if the provided tool contains a complete path.
12822        tool_specified="$WHICH"
12823        tool_basename="${tool_specified##*/}"
12824        if test "x$tool_basename" = "x$tool_specified"; then
12825          # A command without a complete path is provided, search $PATH.
12826          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12827$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12828          # Extract the first word of "$tool_basename", so it can be a program name with args.
12829set dummy $tool_basename; ac_word=$2
12830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12831$as_echo_n "checking for $ac_word... " >&6; }
12832if ${ac_cv_path_WHICH+:} false; then :
12833  $as_echo_n "(cached) " >&6
12834else
12835  case $WHICH in
12836  [\\/]* | ?:[\\/]*)
12837  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12838  ;;
12839  *)
12840  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12841for as_dir in $PATH
12842do
12843  IFS=$as_save_IFS
12844  test -z "$as_dir" && as_dir=.
12845    for ac_exec_ext in '' $ac_executable_extensions; do
12846  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12847    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12848    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12849    break 2
12850  fi
12851done
12852  done
12853IFS=$as_save_IFS
12854
12855  ;;
12856esac
12857fi
12858WHICH=$ac_cv_path_WHICH
12859if test -n "$WHICH"; then
12860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12861$as_echo "$WHICH" >&6; }
12862else
12863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12864$as_echo "no" >&6; }
12865fi
12866
12867
12868          if test "x$WHICH" = x; then
12869            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12870          fi
12871        else
12872          # Otherwise we believe it is a complete path. Use it as it is.
12873          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12874$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12875          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12876$as_echo_n "checking for WHICH... " >&6; }
12877          if test ! -x "$tool_specified"; then
12878            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12879$as_echo "not found" >&6; }
12880            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12881          fi
12882          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12883$as_echo "$tool_specified" >&6; }
12884        fi
12885      fi
12886    fi
12887
12888  fi
12889
12890
12891
12892  if test "x$WHICH" = x; then
12893    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12894  fi
12895
12896
12897
12898
12899
12900  # Publish this variable in the help.
12901
12902
12903  if [ -z "${XARGS+x}" ]; then
12904    # The variable is not set by user, try to locate tool using the code snippet
12905    for ac_prog in xargs
12906do
12907  # Extract the first word of "$ac_prog", so it can be a program name with args.
12908set dummy $ac_prog; ac_word=$2
12909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12910$as_echo_n "checking for $ac_word... " >&6; }
12911if ${ac_cv_path_XARGS+:} false; then :
12912  $as_echo_n "(cached) " >&6
12913else
12914  case $XARGS in
12915  [\\/]* | ?:[\\/]*)
12916  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12917  ;;
12918  *)
12919  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12920for as_dir in $PATH
12921do
12922  IFS=$as_save_IFS
12923  test -z "$as_dir" && as_dir=.
12924    for ac_exec_ext in '' $ac_executable_extensions; do
12925  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12926    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12927    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12928    break 2
12929  fi
12930done
12931  done
12932IFS=$as_save_IFS
12933
12934  ;;
12935esac
12936fi
12937XARGS=$ac_cv_path_XARGS
12938if test -n "$XARGS"; then
12939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12940$as_echo "$XARGS" >&6; }
12941else
12942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12943$as_echo "no" >&6; }
12944fi
12945
12946
12947  test -n "$XARGS" && break
12948done
12949
12950  else
12951    # The variable is set, but is it from the command line or the environment?
12952
12953    # Try to remove the string !XARGS! from our list.
12954    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12955    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12956      # If it failed, the variable was not from the command line. Ignore it,
12957      # but warn the user (except for BASH, which is always set by the calling BASH).
12958      if test "xXARGS" != xBASH; then
12959        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12960$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12961      fi
12962      # Try to locate tool using the code snippet
12963      for ac_prog in xargs
12964do
12965  # Extract the first word of "$ac_prog", so it can be a program name with args.
12966set dummy $ac_prog; ac_word=$2
12967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12968$as_echo_n "checking for $ac_word... " >&6; }
12969if ${ac_cv_path_XARGS+:} false; then :
12970  $as_echo_n "(cached) " >&6
12971else
12972  case $XARGS in
12973  [\\/]* | ?:[\\/]*)
12974  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12975  ;;
12976  *)
12977  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12978for as_dir in $PATH
12979do
12980  IFS=$as_save_IFS
12981  test -z "$as_dir" && as_dir=.
12982    for ac_exec_ext in '' $ac_executable_extensions; do
12983  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12984    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12985    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12986    break 2
12987  fi
12988done
12989  done
12990IFS=$as_save_IFS
12991
12992  ;;
12993esac
12994fi
12995XARGS=$ac_cv_path_XARGS
12996if test -n "$XARGS"; then
12997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12998$as_echo "$XARGS" >&6; }
12999else
13000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13001$as_echo "no" >&6; }
13002fi
13003
13004
13005  test -n "$XARGS" && break
13006done
13007
13008    else
13009      # If it succeeded, then it was overridden by the user. We will use it
13010      # for the tool.
13011
13012      # First remove it from the list of overridden variables, so we can test
13013      # for unknown variables in the end.
13014      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13015
13016      # Check if we try to supply an empty value
13017      if test "x$XARGS" = x; then
13018        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13019$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13020        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13021$as_echo_n "checking for XARGS... " >&6; }
13022        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13023$as_echo "disabled" >&6; }
13024      else
13025        # Check if the provided tool contains a complete path.
13026        tool_specified="$XARGS"
13027        tool_basename="${tool_specified##*/}"
13028        if test "x$tool_basename" = "x$tool_specified"; then
13029          # A command without a complete path is provided, search $PATH.
13030          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13031$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13032          # Extract the first word of "$tool_basename", so it can be a program name with args.
13033set dummy $tool_basename; ac_word=$2
13034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13035$as_echo_n "checking for $ac_word... " >&6; }
13036if ${ac_cv_path_XARGS+:} false; then :
13037  $as_echo_n "(cached) " >&6
13038else
13039  case $XARGS in
13040  [\\/]* | ?:[\\/]*)
13041  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13042  ;;
13043  *)
13044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13045for as_dir in $PATH
13046do
13047  IFS=$as_save_IFS
13048  test -z "$as_dir" && as_dir=.
13049    for ac_exec_ext in '' $ac_executable_extensions; do
13050  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13051    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13053    break 2
13054  fi
13055done
13056  done
13057IFS=$as_save_IFS
13058
13059  ;;
13060esac
13061fi
13062XARGS=$ac_cv_path_XARGS
13063if test -n "$XARGS"; then
13064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13065$as_echo "$XARGS" >&6; }
13066else
13067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13068$as_echo "no" >&6; }
13069fi
13070
13071
13072          if test "x$XARGS" = x; then
13073            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13074          fi
13075        else
13076          # Otherwise we believe it is a complete path. Use it as it is.
13077          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13078$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13079          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13080$as_echo_n "checking for XARGS... " >&6; }
13081          if test ! -x "$tool_specified"; then
13082            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13083$as_echo "not found" >&6; }
13084            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13085          fi
13086          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13087$as_echo "$tool_specified" >&6; }
13088        fi
13089      fi
13090    fi
13091
13092  fi
13093
13094
13095
13096  if test "x$XARGS" = x; then
13097    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13098  fi
13099
13100
13101
13102  # Then required tools that require some special treatment.
13103
13104
13105  # Publish this variable in the help.
13106
13107
13108  if [ -z "${AWK+x}" ]; then
13109    # The variable is not set by user, try to locate tool using the code snippet
13110    for ac_prog in gawk mawk nawk awk
13111do
13112  # Extract the first word of "$ac_prog", so it can be a program name with args.
13113set dummy $ac_prog; ac_word=$2
13114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13115$as_echo_n "checking for $ac_word... " >&6; }
13116if ${ac_cv_prog_AWK+:} false; then :
13117  $as_echo_n "(cached) " >&6
13118else
13119  if test -n "$AWK"; then
13120  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13121else
13122as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13123for as_dir in $PATH
13124do
13125  IFS=$as_save_IFS
13126  test -z "$as_dir" && as_dir=.
13127    for ac_exec_ext in '' $ac_executable_extensions; do
13128  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13129    ac_cv_prog_AWK="$ac_prog"
13130    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13131    break 2
13132  fi
13133done
13134  done
13135IFS=$as_save_IFS
13136
13137fi
13138fi
13139AWK=$ac_cv_prog_AWK
13140if test -n "$AWK"; then
13141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13142$as_echo "$AWK" >&6; }
13143else
13144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13145$as_echo "no" >&6; }
13146fi
13147
13148
13149  test -n "$AWK" && break
13150done
13151
13152  else
13153    # The variable is set, but is it from the command line or the environment?
13154
13155    # Try to remove the string !AWK! from our list.
13156    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13157    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13158      # If it failed, the variable was not from the command line. Ignore it,
13159      # but warn the user (except for BASH, which is always set by the calling BASH).
13160      if test "xAWK" != xBASH; then
13161        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13162$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13163      fi
13164      # Try to locate tool using the code snippet
13165      for ac_prog in gawk mawk nawk awk
13166do
13167  # Extract the first word of "$ac_prog", so it can be a program name with args.
13168set dummy $ac_prog; ac_word=$2
13169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13170$as_echo_n "checking for $ac_word... " >&6; }
13171if ${ac_cv_prog_AWK+:} false; then :
13172  $as_echo_n "(cached) " >&6
13173else
13174  if test -n "$AWK"; then
13175  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13176else
13177as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13178for as_dir in $PATH
13179do
13180  IFS=$as_save_IFS
13181  test -z "$as_dir" && as_dir=.
13182    for ac_exec_ext in '' $ac_executable_extensions; do
13183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13184    ac_cv_prog_AWK="$ac_prog"
13185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13186    break 2
13187  fi
13188done
13189  done
13190IFS=$as_save_IFS
13191
13192fi
13193fi
13194AWK=$ac_cv_prog_AWK
13195if test -n "$AWK"; then
13196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13197$as_echo "$AWK" >&6; }
13198else
13199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13200$as_echo "no" >&6; }
13201fi
13202
13203
13204  test -n "$AWK" && break
13205done
13206
13207    else
13208      # If it succeeded, then it was overridden by the user. We will use it
13209      # for the tool.
13210
13211      # First remove it from the list of overridden variables, so we can test
13212      # for unknown variables in the end.
13213      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13214
13215      # Check if we try to supply an empty value
13216      if test "x$AWK" = x; then
13217        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13218$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13219        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13220$as_echo_n "checking for AWK... " >&6; }
13221        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13222$as_echo "disabled" >&6; }
13223      else
13224        # Check if the provided tool contains a complete path.
13225        tool_specified="$AWK"
13226        tool_basename="${tool_specified##*/}"
13227        if test "x$tool_basename" = "x$tool_specified"; then
13228          # A command without a complete path is provided, search $PATH.
13229          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13230$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13231          # Extract the first word of "$tool_basename", so it can be a program name with args.
13232set dummy $tool_basename; ac_word=$2
13233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13234$as_echo_n "checking for $ac_word... " >&6; }
13235if ${ac_cv_path_AWK+:} false; then :
13236  $as_echo_n "(cached) " >&6
13237else
13238  case $AWK in
13239  [\\/]* | ?:[\\/]*)
13240  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13241  ;;
13242  *)
13243  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13244for as_dir in $PATH
13245do
13246  IFS=$as_save_IFS
13247  test -z "$as_dir" && as_dir=.
13248    for ac_exec_ext in '' $ac_executable_extensions; do
13249  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13250    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13251    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13252    break 2
13253  fi
13254done
13255  done
13256IFS=$as_save_IFS
13257
13258  ;;
13259esac
13260fi
13261AWK=$ac_cv_path_AWK
13262if test -n "$AWK"; then
13263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13264$as_echo "$AWK" >&6; }
13265else
13266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13267$as_echo "no" >&6; }
13268fi
13269
13270
13271          if test "x$AWK" = x; then
13272            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13273          fi
13274        else
13275          # Otherwise we believe it is a complete path. Use it as it is.
13276          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13277$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13278          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13279$as_echo_n "checking for AWK... " >&6; }
13280          if test ! -x "$tool_specified"; then
13281            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13282$as_echo "not found" >&6; }
13283            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13284          fi
13285          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13286$as_echo "$tool_specified" >&6; }
13287        fi
13288      fi
13289    fi
13290
13291  fi
13292
13293
13294  if test "x$AWK" = x; then
13295    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13296  fi
13297
13298
13299
13300
13301  # Publish this variable in the help.
13302
13303
13304  if [ -z "${GREP+x}" ]; then
13305    # The variable is not set by user, try to locate tool using the code snippet
13306    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13307$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13308if ${ac_cv_path_GREP+:} false; then :
13309  $as_echo_n "(cached) " >&6
13310else
13311  if test -z "$GREP"; then
13312  ac_path_GREP_found=false
13313  # Loop through the user's path and test for each of PROGNAME-LIST
13314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13315for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13316do
13317  IFS=$as_save_IFS
13318  test -z "$as_dir" && as_dir=.
13319    for ac_prog in grep ggrep; do
13320    for ac_exec_ext in '' $ac_executable_extensions; do
13321      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13322      as_fn_executable_p "$ac_path_GREP" || continue
13323# Check for GNU ac_path_GREP and select it if it is found.
13324  # Check for GNU $ac_path_GREP
13325case `"$ac_path_GREP" --version 2>&1` in
13326*GNU*)
13327  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13328*)
13329  ac_count=0
13330  $as_echo_n 0123456789 >"conftest.in"
13331  while :
13332  do
13333    cat "conftest.in" "conftest.in" >"conftest.tmp"
13334    mv "conftest.tmp" "conftest.in"
13335    cp "conftest.in" "conftest.nl"
13336    $as_echo 'GREP' >> "conftest.nl"
13337    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13338    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13339    as_fn_arith $ac_count + 1 && ac_count=$as_val
13340    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13341      # Best one so far, save it but keep looking for a better one
13342      ac_cv_path_GREP="$ac_path_GREP"
13343      ac_path_GREP_max=$ac_count
13344    fi
13345    # 10*(2^10) chars as input seems more than enough
13346    test $ac_count -gt 10 && break
13347  done
13348  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13349esac
13350
13351      $ac_path_GREP_found && break 3
13352    done
13353  done
13354  done
13355IFS=$as_save_IFS
13356  if test -z "$ac_cv_path_GREP"; then
13357    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13358  fi
13359else
13360  ac_cv_path_GREP=$GREP
13361fi
13362
13363fi
13364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13365$as_echo "$ac_cv_path_GREP" >&6; }
13366 GREP="$ac_cv_path_GREP"
13367
13368
13369  else
13370    # The variable is set, but is it from the command line or the environment?
13371
13372    # Try to remove the string !GREP! from our list.
13373    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13374    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13375      # If it failed, the variable was not from the command line. Ignore it,
13376      # but warn the user (except for BASH, which is always set by the calling BASH).
13377      if test "xGREP" != xBASH; then
13378        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13379$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13380      fi
13381      # Try to locate tool using the code snippet
13382      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13383$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13384if ${ac_cv_path_GREP+:} false; then :
13385  $as_echo_n "(cached) " >&6
13386else
13387  if test -z "$GREP"; then
13388  ac_path_GREP_found=false
13389  # Loop through the user's path and test for each of PROGNAME-LIST
13390  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13391for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13392do
13393  IFS=$as_save_IFS
13394  test -z "$as_dir" && as_dir=.
13395    for ac_prog in grep ggrep; do
13396    for ac_exec_ext in '' $ac_executable_extensions; do
13397      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13398      as_fn_executable_p "$ac_path_GREP" || continue
13399# Check for GNU ac_path_GREP and select it if it is found.
13400  # Check for GNU $ac_path_GREP
13401case `"$ac_path_GREP" --version 2>&1` in
13402*GNU*)
13403  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13404*)
13405  ac_count=0
13406  $as_echo_n 0123456789 >"conftest.in"
13407  while :
13408  do
13409    cat "conftest.in" "conftest.in" >"conftest.tmp"
13410    mv "conftest.tmp" "conftest.in"
13411    cp "conftest.in" "conftest.nl"
13412    $as_echo 'GREP' >> "conftest.nl"
13413    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13414    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13415    as_fn_arith $ac_count + 1 && ac_count=$as_val
13416    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13417      # Best one so far, save it but keep looking for a better one
13418      ac_cv_path_GREP="$ac_path_GREP"
13419      ac_path_GREP_max=$ac_count
13420    fi
13421    # 10*(2^10) chars as input seems more than enough
13422    test $ac_count -gt 10 && break
13423  done
13424  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13425esac
13426
13427      $ac_path_GREP_found && break 3
13428    done
13429  done
13430  done
13431IFS=$as_save_IFS
13432  if test -z "$ac_cv_path_GREP"; then
13433    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13434  fi
13435else
13436  ac_cv_path_GREP=$GREP
13437fi
13438
13439fi
13440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13441$as_echo "$ac_cv_path_GREP" >&6; }
13442 GREP="$ac_cv_path_GREP"
13443
13444
13445    else
13446      # If it succeeded, then it was overridden by the user. We will use it
13447      # for the tool.
13448
13449      # First remove it from the list of overridden variables, so we can test
13450      # for unknown variables in the end.
13451      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13452
13453      # Check if we try to supply an empty value
13454      if test "x$GREP" = x; then
13455        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13456$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13457        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13458$as_echo_n "checking for GREP... " >&6; }
13459        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13460$as_echo "disabled" >&6; }
13461      else
13462        # Check if the provided tool contains a complete path.
13463        tool_specified="$GREP"
13464        tool_basename="${tool_specified##*/}"
13465        if test "x$tool_basename" = "x$tool_specified"; then
13466          # A command without a complete path is provided, search $PATH.
13467          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13468$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13469          # Extract the first word of "$tool_basename", so it can be a program name with args.
13470set dummy $tool_basename; ac_word=$2
13471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13472$as_echo_n "checking for $ac_word... " >&6; }
13473if ${ac_cv_path_GREP+:} false; then :
13474  $as_echo_n "(cached) " >&6
13475else
13476  case $GREP in
13477  [\\/]* | ?:[\\/]*)
13478  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13479  ;;
13480  *)
13481  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13482for as_dir in $PATH
13483do
13484  IFS=$as_save_IFS
13485  test -z "$as_dir" && as_dir=.
13486    for ac_exec_ext in '' $ac_executable_extensions; do
13487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13488    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13490    break 2
13491  fi
13492done
13493  done
13494IFS=$as_save_IFS
13495
13496  ;;
13497esac
13498fi
13499GREP=$ac_cv_path_GREP
13500if test -n "$GREP"; then
13501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13502$as_echo "$GREP" >&6; }
13503else
13504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13505$as_echo "no" >&6; }
13506fi
13507
13508
13509          if test "x$GREP" = x; then
13510            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13511          fi
13512        else
13513          # Otherwise we believe it is a complete path. Use it as it is.
13514          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13515$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13516          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13517$as_echo_n "checking for GREP... " >&6; }
13518          if test ! -x "$tool_specified"; then
13519            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13520$as_echo "not found" >&6; }
13521            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13522          fi
13523          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13524$as_echo "$tool_specified" >&6; }
13525        fi
13526      fi
13527    fi
13528
13529  fi
13530
13531
13532  if test "x$GREP" = x; then
13533    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13534  fi
13535
13536
13537
13538
13539  # Publish this variable in the help.
13540
13541
13542  if [ -z "${EGREP+x}" ]; then
13543    # The variable is not set by user, try to locate tool using the code snippet
13544    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13545$as_echo_n "checking for egrep... " >&6; }
13546if ${ac_cv_path_EGREP+:} false; then :
13547  $as_echo_n "(cached) " >&6
13548else
13549  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13550   then ac_cv_path_EGREP="$GREP -E"
13551   else
13552     if test -z "$EGREP"; then
13553  ac_path_EGREP_found=false
13554  # Loop through the user's path and test for each of PROGNAME-LIST
13555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13556for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13557do
13558  IFS=$as_save_IFS
13559  test -z "$as_dir" && as_dir=.
13560    for ac_prog in egrep; do
13561    for ac_exec_ext in '' $ac_executable_extensions; do
13562      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13563      as_fn_executable_p "$ac_path_EGREP" || continue
13564# Check for GNU ac_path_EGREP and select it if it is found.
13565  # Check for GNU $ac_path_EGREP
13566case `"$ac_path_EGREP" --version 2>&1` in
13567*GNU*)
13568  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13569*)
13570  ac_count=0
13571  $as_echo_n 0123456789 >"conftest.in"
13572  while :
13573  do
13574    cat "conftest.in" "conftest.in" >"conftest.tmp"
13575    mv "conftest.tmp" "conftest.in"
13576    cp "conftest.in" "conftest.nl"
13577    $as_echo 'EGREP' >> "conftest.nl"
13578    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13579    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13580    as_fn_arith $ac_count + 1 && ac_count=$as_val
13581    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13582      # Best one so far, save it but keep looking for a better one
13583      ac_cv_path_EGREP="$ac_path_EGREP"
13584      ac_path_EGREP_max=$ac_count
13585    fi
13586    # 10*(2^10) chars as input seems more than enough
13587    test $ac_count -gt 10 && break
13588  done
13589  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13590esac
13591
13592      $ac_path_EGREP_found && break 3
13593    done
13594  done
13595  done
13596IFS=$as_save_IFS
13597  if test -z "$ac_cv_path_EGREP"; then
13598    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13599  fi
13600else
13601  ac_cv_path_EGREP=$EGREP
13602fi
13603
13604   fi
13605fi
13606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13607$as_echo "$ac_cv_path_EGREP" >&6; }
13608 EGREP="$ac_cv_path_EGREP"
13609
13610
13611  else
13612    # The variable is set, but is it from the command line or the environment?
13613
13614    # Try to remove the string !EGREP! from our list.
13615    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13616    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13617      # If it failed, the variable was not from the command line. Ignore it,
13618      # but warn the user (except for BASH, which is always set by the calling BASH).
13619      if test "xEGREP" != xBASH; then
13620        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13621$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13622      fi
13623      # Try to locate tool using the code snippet
13624      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13625$as_echo_n "checking for egrep... " >&6; }
13626if ${ac_cv_path_EGREP+:} false; then :
13627  $as_echo_n "(cached) " >&6
13628else
13629  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13630   then ac_cv_path_EGREP="$GREP -E"
13631   else
13632     if test -z "$EGREP"; then
13633  ac_path_EGREP_found=false
13634  # Loop through the user's path and test for each of PROGNAME-LIST
13635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13636for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13637do
13638  IFS=$as_save_IFS
13639  test -z "$as_dir" && as_dir=.
13640    for ac_prog in egrep; do
13641    for ac_exec_ext in '' $ac_executable_extensions; do
13642      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13643      as_fn_executable_p "$ac_path_EGREP" || continue
13644# Check for GNU ac_path_EGREP and select it if it is found.
13645  # Check for GNU $ac_path_EGREP
13646case `"$ac_path_EGREP" --version 2>&1` in
13647*GNU*)
13648  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13649*)
13650  ac_count=0
13651  $as_echo_n 0123456789 >"conftest.in"
13652  while :
13653  do
13654    cat "conftest.in" "conftest.in" >"conftest.tmp"
13655    mv "conftest.tmp" "conftest.in"
13656    cp "conftest.in" "conftest.nl"
13657    $as_echo 'EGREP' >> "conftest.nl"
13658    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13659    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13660    as_fn_arith $ac_count + 1 && ac_count=$as_val
13661    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13662      # Best one so far, save it but keep looking for a better one
13663      ac_cv_path_EGREP="$ac_path_EGREP"
13664      ac_path_EGREP_max=$ac_count
13665    fi
13666    # 10*(2^10) chars as input seems more than enough
13667    test $ac_count -gt 10 && break
13668  done
13669  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13670esac
13671
13672      $ac_path_EGREP_found && break 3
13673    done
13674  done
13675  done
13676IFS=$as_save_IFS
13677  if test -z "$ac_cv_path_EGREP"; then
13678    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13679  fi
13680else
13681  ac_cv_path_EGREP=$EGREP
13682fi
13683
13684   fi
13685fi
13686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13687$as_echo "$ac_cv_path_EGREP" >&6; }
13688 EGREP="$ac_cv_path_EGREP"
13689
13690
13691    else
13692      # If it succeeded, then it was overridden by the user. We will use it
13693      # for the tool.
13694
13695      # First remove it from the list of overridden variables, so we can test
13696      # for unknown variables in the end.
13697      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13698
13699      # Check if we try to supply an empty value
13700      if test "x$EGREP" = x; then
13701        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13702$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13703        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13704$as_echo_n "checking for EGREP... " >&6; }
13705        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13706$as_echo "disabled" >&6; }
13707      else
13708        # Check if the provided tool contains a complete path.
13709        tool_specified="$EGREP"
13710        tool_basename="${tool_specified##*/}"
13711        if test "x$tool_basename" = "x$tool_specified"; then
13712          # A command without a complete path is provided, search $PATH.
13713          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13714$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13715          # Extract the first word of "$tool_basename", so it can be a program name with args.
13716set dummy $tool_basename; ac_word=$2
13717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13718$as_echo_n "checking for $ac_word... " >&6; }
13719if ${ac_cv_path_EGREP+:} false; then :
13720  $as_echo_n "(cached) " >&6
13721else
13722  case $EGREP in
13723  [\\/]* | ?:[\\/]*)
13724  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13725  ;;
13726  *)
13727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13728for as_dir in $PATH
13729do
13730  IFS=$as_save_IFS
13731  test -z "$as_dir" && as_dir=.
13732    for ac_exec_ext in '' $ac_executable_extensions; do
13733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13734    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13736    break 2
13737  fi
13738done
13739  done
13740IFS=$as_save_IFS
13741
13742  ;;
13743esac
13744fi
13745EGREP=$ac_cv_path_EGREP
13746if test -n "$EGREP"; then
13747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13748$as_echo "$EGREP" >&6; }
13749else
13750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13751$as_echo "no" >&6; }
13752fi
13753
13754
13755          if test "x$EGREP" = x; then
13756            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13757          fi
13758        else
13759          # Otherwise we believe it is a complete path. Use it as it is.
13760          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13761$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13762          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13763$as_echo_n "checking for EGREP... " >&6; }
13764          if test ! -x "$tool_specified"; then
13765            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13766$as_echo "not found" >&6; }
13767            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13768          fi
13769          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13770$as_echo "$tool_specified" >&6; }
13771        fi
13772      fi
13773    fi
13774
13775  fi
13776
13777
13778  if test "x$EGREP" = x; then
13779    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13780  fi
13781
13782
13783
13784
13785  # Publish this variable in the help.
13786
13787
13788  if [ -z "${FGREP+x}" ]; then
13789    # The variable is not set by user, try to locate tool using the code snippet
13790    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13791$as_echo_n "checking for fgrep... " >&6; }
13792if ${ac_cv_path_FGREP+:} false; then :
13793  $as_echo_n "(cached) " >&6
13794else
13795  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13796   then ac_cv_path_FGREP="$GREP -F"
13797   else
13798     if test -z "$FGREP"; then
13799  ac_path_FGREP_found=false
13800  # Loop through the user's path and test for each of PROGNAME-LIST
13801  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13802for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13803do
13804  IFS=$as_save_IFS
13805  test -z "$as_dir" && as_dir=.
13806    for ac_prog in fgrep; do
13807    for ac_exec_ext in '' $ac_executable_extensions; do
13808      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13809      as_fn_executable_p "$ac_path_FGREP" || continue
13810# Check for GNU ac_path_FGREP and select it if it is found.
13811  # Check for GNU $ac_path_FGREP
13812case `"$ac_path_FGREP" --version 2>&1` in
13813*GNU*)
13814  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13815*)
13816  ac_count=0
13817  $as_echo_n 0123456789 >"conftest.in"
13818  while :
13819  do
13820    cat "conftest.in" "conftest.in" >"conftest.tmp"
13821    mv "conftest.tmp" "conftest.in"
13822    cp "conftest.in" "conftest.nl"
13823    $as_echo 'FGREP' >> "conftest.nl"
13824    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13825    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13826    as_fn_arith $ac_count + 1 && ac_count=$as_val
13827    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13828      # Best one so far, save it but keep looking for a better one
13829      ac_cv_path_FGREP="$ac_path_FGREP"
13830      ac_path_FGREP_max=$ac_count
13831    fi
13832    # 10*(2^10) chars as input seems more than enough
13833    test $ac_count -gt 10 && break
13834  done
13835  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13836esac
13837
13838      $ac_path_FGREP_found && break 3
13839    done
13840  done
13841  done
13842IFS=$as_save_IFS
13843  if test -z "$ac_cv_path_FGREP"; then
13844    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13845  fi
13846else
13847  ac_cv_path_FGREP=$FGREP
13848fi
13849
13850   fi
13851fi
13852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13853$as_echo "$ac_cv_path_FGREP" >&6; }
13854 FGREP="$ac_cv_path_FGREP"
13855
13856
13857  else
13858    # The variable is set, but is it from the command line or the environment?
13859
13860    # Try to remove the string !FGREP! from our list.
13861    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13862    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13863      # If it failed, the variable was not from the command line. Ignore it,
13864      # but warn the user (except for BASH, which is always set by the calling BASH).
13865      if test "xFGREP" != xBASH; then
13866        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13867$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13868      fi
13869      # Try to locate tool using the code snippet
13870      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13871$as_echo_n "checking for fgrep... " >&6; }
13872if ${ac_cv_path_FGREP+:} false; then :
13873  $as_echo_n "(cached) " >&6
13874else
13875  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13876   then ac_cv_path_FGREP="$GREP -F"
13877   else
13878     if test -z "$FGREP"; then
13879  ac_path_FGREP_found=false
13880  # Loop through the user's path and test for each of PROGNAME-LIST
13881  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13882for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13883do
13884  IFS=$as_save_IFS
13885  test -z "$as_dir" && as_dir=.
13886    for ac_prog in fgrep; do
13887    for ac_exec_ext in '' $ac_executable_extensions; do
13888      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13889      as_fn_executable_p "$ac_path_FGREP" || continue
13890# Check for GNU ac_path_FGREP and select it if it is found.
13891  # Check for GNU $ac_path_FGREP
13892case `"$ac_path_FGREP" --version 2>&1` in
13893*GNU*)
13894  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13895*)
13896  ac_count=0
13897  $as_echo_n 0123456789 >"conftest.in"
13898  while :
13899  do
13900    cat "conftest.in" "conftest.in" >"conftest.tmp"
13901    mv "conftest.tmp" "conftest.in"
13902    cp "conftest.in" "conftest.nl"
13903    $as_echo 'FGREP' >> "conftest.nl"
13904    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13905    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13906    as_fn_arith $ac_count + 1 && ac_count=$as_val
13907    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13908      # Best one so far, save it but keep looking for a better one
13909      ac_cv_path_FGREP="$ac_path_FGREP"
13910      ac_path_FGREP_max=$ac_count
13911    fi
13912    # 10*(2^10) chars as input seems more than enough
13913    test $ac_count -gt 10 && break
13914  done
13915  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13916esac
13917
13918      $ac_path_FGREP_found && break 3
13919    done
13920  done
13921  done
13922IFS=$as_save_IFS
13923  if test -z "$ac_cv_path_FGREP"; then
13924    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13925  fi
13926else
13927  ac_cv_path_FGREP=$FGREP
13928fi
13929
13930   fi
13931fi
13932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13933$as_echo "$ac_cv_path_FGREP" >&6; }
13934 FGREP="$ac_cv_path_FGREP"
13935
13936
13937    else
13938      # If it succeeded, then it was overridden by the user. We will use it
13939      # for the tool.
13940
13941      # First remove it from the list of overridden variables, so we can test
13942      # for unknown variables in the end.
13943      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13944
13945      # Check if we try to supply an empty value
13946      if test "x$FGREP" = x; then
13947        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13948$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13949        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13950$as_echo_n "checking for FGREP... " >&6; }
13951        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13952$as_echo "disabled" >&6; }
13953      else
13954        # Check if the provided tool contains a complete path.
13955        tool_specified="$FGREP"
13956        tool_basename="${tool_specified##*/}"
13957        if test "x$tool_basename" = "x$tool_specified"; then
13958          # A command without a complete path is provided, search $PATH.
13959          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13960$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13961          # Extract the first word of "$tool_basename", so it can be a program name with args.
13962set dummy $tool_basename; ac_word=$2
13963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13964$as_echo_n "checking for $ac_word... " >&6; }
13965if ${ac_cv_path_FGREP+:} false; then :
13966  $as_echo_n "(cached) " >&6
13967else
13968  case $FGREP in
13969  [\\/]* | ?:[\\/]*)
13970  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13971  ;;
13972  *)
13973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13974for as_dir in $PATH
13975do
13976  IFS=$as_save_IFS
13977  test -z "$as_dir" && as_dir=.
13978    for ac_exec_ext in '' $ac_executable_extensions; do
13979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13980    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13982    break 2
13983  fi
13984done
13985  done
13986IFS=$as_save_IFS
13987
13988  ;;
13989esac
13990fi
13991FGREP=$ac_cv_path_FGREP
13992if test -n "$FGREP"; then
13993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13994$as_echo "$FGREP" >&6; }
13995else
13996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13997$as_echo "no" >&6; }
13998fi
13999
14000
14001          if test "x$FGREP" = x; then
14002            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14003          fi
14004        else
14005          # Otherwise we believe it is a complete path. Use it as it is.
14006          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14007$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14008          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14009$as_echo_n "checking for FGREP... " >&6; }
14010          if test ! -x "$tool_specified"; then
14011            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14012$as_echo "not found" >&6; }
14013            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14014          fi
14015          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14016$as_echo "$tool_specified" >&6; }
14017        fi
14018      fi
14019    fi
14020
14021  fi
14022
14023
14024  if test "x$FGREP" = x; then
14025    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14026  fi
14027
14028
14029
14030
14031  # Publish this variable in the help.
14032
14033
14034  if [ -z "${SED+x}" ]; then
14035    # The variable is not set by user, try to locate tool using the code snippet
14036    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14037$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14038if ${ac_cv_path_SED+:} false; then :
14039  $as_echo_n "(cached) " >&6
14040else
14041            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14042     for ac_i in 1 2 3 4 5 6 7; do
14043       ac_script="$ac_script$as_nl$ac_script"
14044     done
14045     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14046     { ac_script=; unset ac_script;}
14047     if test -z "$SED"; then
14048  ac_path_SED_found=false
14049  # Loop through the user's path and test for each of PROGNAME-LIST
14050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14051for as_dir in $PATH
14052do
14053  IFS=$as_save_IFS
14054  test -z "$as_dir" && as_dir=.
14055    for ac_prog in sed gsed; do
14056    for ac_exec_ext in '' $ac_executable_extensions; do
14057      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14058      as_fn_executable_p "$ac_path_SED" || continue
14059# Check for GNU ac_path_SED and select it if it is found.
14060  # Check for GNU $ac_path_SED
14061case `"$ac_path_SED" --version 2>&1` in
14062*GNU*)
14063  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14064*)
14065  ac_count=0
14066  $as_echo_n 0123456789 >"conftest.in"
14067  while :
14068  do
14069    cat "conftest.in" "conftest.in" >"conftest.tmp"
14070    mv "conftest.tmp" "conftest.in"
14071    cp "conftest.in" "conftest.nl"
14072    $as_echo '' >> "conftest.nl"
14073    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14074    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14075    as_fn_arith $ac_count + 1 && ac_count=$as_val
14076    if test $ac_count -gt ${ac_path_SED_max-0}; then
14077      # Best one so far, save it but keep looking for a better one
14078      ac_cv_path_SED="$ac_path_SED"
14079      ac_path_SED_max=$ac_count
14080    fi
14081    # 10*(2^10) chars as input seems more than enough
14082    test $ac_count -gt 10 && break
14083  done
14084  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14085esac
14086
14087      $ac_path_SED_found && break 3
14088    done
14089  done
14090  done
14091IFS=$as_save_IFS
14092  if test -z "$ac_cv_path_SED"; then
14093    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14094  fi
14095else
14096  ac_cv_path_SED=$SED
14097fi
14098
14099fi
14100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14101$as_echo "$ac_cv_path_SED" >&6; }
14102 SED="$ac_cv_path_SED"
14103  rm -f conftest.sed
14104
14105  else
14106    # The variable is set, but is it from the command line or the environment?
14107
14108    # Try to remove the string !SED! from our list.
14109    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14110    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14111      # If it failed, the variable was not from the command line. Ignore it,
14112      # but warn the user (except for BASH, which is always set by the calling BASH).
14113      if test "xSED" != xBASH; then
14114        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14115$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14116      fi
14117      # Try to locate tool using the code snippet
14118      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14119$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14120if ${ac_cv_path_SED+:} false; then :
14121  $as_echo_n "(cached) " >&6
14122else
14123            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14124     for ac_i in 1 2 3 4 5 6 7; do
14125       ac_script="$ac_script$as_nl$ac_script"
14126     done
14127     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14128     { ac_script=; unset ac_script;}
14129     if test -z "$SED"; then
14130  ac_path_SED_found=false
14131  # Loop through the user's path and test for each of PROGNAME-LIST
14132  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14133for as_dir in $PATH
14134do
14135  IFS=$as_save_IFS
14136  test -z "$as_dir" && as_dir=.
14137    for ac_prog in sed gsed; do
14138    for ac_exec_ext in '' $ac_executable_extensions; do
14139      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14140      as_fn_executable_p "$ac_path_SED" || continue
14141# Check for GNU ac_path_SED and select it if it is found.
14142  # Check for GNU $ac_path_SED
14143case `"$ac_path_SED" --version 2>&1` in
14144*GNU*)
14145  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14146*)
14147  ac_count=0
14148  $as_echo_n 0123456789 >"conftest.in"
14149  while :
14150  do
14151    cat "conftest.in" "conftest.in" >"conftest.tmp"
14152    mv "conftest.tmp" "conftest.in"
14153    cp "conftest.in" "conftest.nl"
14154    $as_echo '' >> "conftest.nl"
14155    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14156    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14157    as_fn_arith $ac_count + 1 && ac_count=$as_val
14158    if test $ac_count -gt ${ac_path_SED_max-0}; then
14159      # Best one so far, save it but keep looking for a better one
14160      ac_cv_path_SED="$ac_path_SED"
14161      ac_path_SED_max=$ac_count
14162    fi
14163    # 10*(2^10) chars as input seems more than enough
14164    test $ac_count -gt 10 && break
14165  done
14166  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14167esac
14168
14169      $ac_path_SED_found && break 3
14170    done
14171  done
14172  done
14173IFS=$as_save_IFS
14174  if test -z "$ac_cv_path_SED"; then
14175    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14176  fi
14177else
14178  ac_cv_path_SED=$SED
14179fi
14180
14181fi
14182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14183$as_echo "$ac_cv_path_SED" >&6; }
14184 SED="$ac_cv_path_SED"
14185  rm -f conftest.sed
14186
14187    else
14188      # If it succeeded, then it was overridden by the user. We will use it
14189      # for the tool.
14190
14191      # First remove it from the list of overridden variables, so we can test
14192      # for unknown variables in the end.
14193      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14194
14195      # Check if we try to supply an empty value
14196      if test "x$SED" = x; then
14197        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14198$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14199        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14200$as_echo_n "checking for SED... " >&6; }
14201        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14202$as_echo "disabled" >&6; }
14203      else
14204        # Check if the provided tool contains a complete path.
14205        tool_specified="$SED"
14206        tool_basename="${tool_specified##*/}"
14207        if test "x$tool_basename" = "x$tool_specified"; then
14208          # A command without a complete path is provided, search $PATH.
14209          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14210$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14211          # Extract the first word of "$tool_basename", so it can be a program name with args.
14212set dummy $tool_basename; ac_word=$2
14213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14214$as_echo_n "checking for $ac_word... " >&6; }
14215if ${ac_cv_path_SED+:} false; then :
14216  $as_echo_n "(cached) " >&6
14217else
14218  case $SED in
14219  [\\/]* | ?:[\\/]*)
14220  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14221  ;;
14222  *)
14223  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14224for as_dir in $PATH
14225do
14226  IFS=$as_save_IFS
14227  test -z "$as_dir" && as_dir=.
14228    for ac_exec_ext in '' $ac_executable_extensions; do
14229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14230    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14232    break 2
14233  fi
14234done
14235  done
14236IFS=$as_save_IFS
14237
14238  ;;
14239esac
14240fi
14241SED=$ac_cv_path_SED
14242if test -n "$SED"; then
14243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14244$as_echo "$SED" >&6; }
14245else
14246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14247$as_echo "no" >&6; }
14248fi
14249
14250
14251          if test "x$SED" = x; then
14252            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14253          fi
14254        else
14255          # Otherwise we believe it is a complete path. Use it as it is.
14256          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14257$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14258          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14259$as_echo_n "checking for SED... " >&6; }
14260          if test ! -x "$tool_specified"; then
14261            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14262$as_echo "not found" >&6; }
14263            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14264          fi
14265          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14266$as_echo "$tool_specified" >&6; }
14267        fi
14268      fi
14269    fi
14270
14271  fi
14272
14273
14274  if test "x$SED" = x; then
14275    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14276  fi
14277
14278
14279
14280  # Always force rm.
14281  RM="$RM -f"
14282
14283  # pwd behaves differently on various platforms and some don't support the -L flag.
14284  # Always use the bash builtin pwd to get uniform behavior.
14285  THEPWDCMD=pwd
14286
14287  # These are not required on all platforms
14288
14289
14290  # Publish this variable in the help.
14291
14292
14293  if [ -z "${CYGPATH+x}" ]; then
14294    # The variable is not set by user, try to locate tool using the code snippet
14295    for ac_prog in cygpath
14296do
14297  # Extract the first word of "$ac_prog", so it can be a program name with args.
14298set dummy $ac_prog; ac_word=$2
14299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14300$as_echo_n "checking for $ac_word... " >&6; }
14301if ${ac_cv_path_CYGPATH+:} false; then :
14302  $as_echo_n "(cached) " >&6
14303else
14304  case $CYGPATH in
14305  [\\/]* | ?:[\\/]*)
14306  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14307  ;;
14308  *)
14309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14310for as_dir in $PATH
14311do
14312  IFS=$as_save_IFS
14313  test -z "$as_dir" && as_dir=.
14314    for ac_exec_ext in '' $ac_executable_extensions; do
14315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14316    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14318    break 2
14319  fi
14320done
14321  done
14322IFS=$as_save_IFS
14323
14324  ;;
14325esac
14326fi
14327CYGPATH=$ac_cv_path_CYGPATH
14328if test -n "$CYGPATH"; then
14329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14330$as_echo "$CYGPATH" >&6; }
14331else
14332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14333$as_echo "no" >&6; }
14334fi
14335
14336
14337  test -n "$CYGPATH" && break
14338done
14339
14340  else
14341    # The variable is set, but is it from the command line or the environment?
14342
14343    # Try to remove the string !CYGPATH! from our list.
14344    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14345    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14346      # If it failed, the variable was not from the command line. Ignore it,
14347      # but warn the user (except for BASH, which is always set by the calling BASH).
14348      if test "xCYGPATH" != xBASH; then
14349        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14350$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14351      fi
14352      # Try to locate tool using the code snippet
14353      for ac_prog in cygpath
14354do
14355  # Extract the first word of "$ac_prog", so it can be a program name with args.
14356set dummy $ac_prog; ac_word=$2
14357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14358$as_echo_n "checking for $ac_word... " >&6; }
14359if ${ac_cv_path_CYGPATH+:} false; then :
14360  $as_echo_n "(cached) " >&6
14361else
14362  case $CYGPATH in
14363  [\\/]* | ?:[\\/]*)
14364  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14365  ;;
14366  *)
14367  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14368for as_dir in $PATH
14369do
14370  IFS=$as_save_IFS
14371  test -z "$as_dir" && as_dir=.
14372    for ac_exec_ext in '' $ac_executable_extensions; do
14373  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14374    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14376    break 2
14377  fi
14378done
14379  done
14380IFS=$as_save_IFS
14381
14382  ;;
14383esac
14384fi
14385CYGPATH=$ac_cv_path_CYGPATH
14386if test -n "$CYGPATH"; then
14387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14388$as_echo "$CYGPATH" >&6; }
14389else
14390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14391$as_echo "no" >&6; }
14392fi
14393
14394
14395  test -n "$CYGPATH" && break
14396done
14397
14398    else
14399      # If it succeeded, then it was overridden by the user. We will use it
14400      # for the tool.
14401
14402      # First remove it from the list of overridden variables, so we can test
14403      # for unknown variables in the end.
14404      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14405
14406      # Check if we try to supply an empty value
14407      if test "x$CYGPATH" = x; then
14408        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14409$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14410        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14411$as_echo_n "checking for CYGPATH... " >&6; }
14412        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14413$as_echo "disabled" >&6; }
14414      else
14415        # Check if the provided tool contains a complete path.
14416        tool_specified="$CYGPATH"
14417        tool_basename="${tool_specified##*/}"
14418        if test "x$tool_basename" = "x$tool_specified"; then
14419          # A command without a complete path is provided, search $PATH.
14420          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14421$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14422          # Extract the first word of "$tool_basename", so it can be a program name with args.
14423set dummy $tool_basename; ac_word=$2
14424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14425$as_echo_n "checking for $ac_word... " >&6; }
14426if ${ac_cv_path_CYGPATH+:} false; then :
14427  $as_echo_n "(cached) " >&6
14428else
14429  case $CYGPATH in
14430  [\\/]* | ?:[\\/]*)
14431  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14432  ;;
14433  *)
14434  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14435for as_dir in $PATH
14436do
14437  IFS=$as_save_IFS
14438  test -z "$as_dir" && as_dir=.
14439    for ac_exec_ext in '' $ac_executable_extensions; do
14440  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14441    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14443    break 2
14444  fi
14445done
14446  done
14447IFS=$as_save_IFS
14448
14449  ;;
14450esac
14451fi
14452CYGPATH=$ac_cv_path_CYGPATH
14453if test -n "$CYGPATH"; then
14454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14455$as_echo "$CYGPATH" >&6; }
14456else
14457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14458$as_echo "no" >&6; }
14459fi
14460
14461
14462          if test "x$CYGPATH" = x; then
14463            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14464          fi
14465        else
14466          # Otherwise we believe it is a complete path. Use it as it is.
14467          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14468$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14469          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14470$as_echo_n "checking for CYGPATH... " >&6; }
14471          if test ! -x "$tool_specified"; then
14472            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14473$as_echo "not found" >&6; }
14474            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14475          fi
14476          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14477$as_echo "$tool_specified" >&6; }
14478        fi
14479      fi
14480    fi
14481
14482  fi
14483
14484
14485
14486
14487  # Publish this variable in the help.
14488
14489
14490  if [ -z "${READLINK+x}" ]; then
14491    # The variable is not set by user, try to locate tool using the code snippet
14492    for ac_prog in greadlink readlink
14493do
14494  # Extract the first word of "$ac_prog", so it can be a program name with args.
14495set dummy $ac_prog; ac_word=$2
14496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14497$as_echo_n "checking for $ac_word... " >&6; }
14498if ${ac_cv_path_READLINK+:} false; then :
14499  $as_echo_n "(cached) " >&6
14500else
14501  case $READLINK in
14502  [\\/]* | ?:[\\/]*)
14503  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14504  ;;
14505  *)
14506  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14507for as_dir in $PATH
14508do
14509  IFS=$as_save_IFS
14510  test -z "$as_dir" && as_dir=.
14511    for ac_exec_ext in '' $ac_executable_extensions; do
14512  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14513    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14515    break 2
14516  fi
14517done
14518  done
14519IFS=$as_save_IFS
14520
14521  ;;
14522esac
14523fi
14524READLINK=$ac_cv_path_READLINK
14525if test -n "$READLINK"; then
14526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14527$as_echo "$READLINK" >&6; }
14528else
14529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14530$as_echo "no" >&6; }
14531fi
14532
14533
14534  test -n "$READLINK" && break
14535done
14536
14537  else
14538    # The variable is set, but is it from the command line or the environment?
14539
14540    # Try to remove the string !READLINK! from our list.
14541    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14542    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14543      # If it failed, the variable was not from the command line. Ignore it,
14544      # but warn the user (except for BASH, which is always set by the calling BASH).
14545      if test "xREADLINK" != xBASH; then
14546        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14547$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14548      fi
14549      # Try to locate tool using the code snippet
14550      for ac_prog in greadlink readlink
14551do
14552  # Extract the first word of "$ac_prog", so it can be a program name with args.
14553set dummy $ac_prog; ac_word=$2
14554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14555$as_echo_n "checking for $ac_word... " >&6; }
14556if ${ac_cv_path_READLINK+:} false; then :
14557  $as_echo_n "(cached) " >&6
14558else
14559  case $READLINK in
14560  [\\/]* | ?:[\\/]*)
14561  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14562  ;;
14563  *)
14564  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14565for as_dir in $PATH
14566do
14567  IFS=$as_save_IFS
14568  test -z "$as_dir" && as_dir=.
14569    for ac_exec_ext in '' $ac_executable_extensions; do
14570  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14571    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14573    break 2
14574  fi
14575done
14576  done
14577IFS=$as_save_IFS
14578
14579  ;;
14580esac
14581fi
14582READLINK=$ac_cv_path_READLINK
14583if test -n "$READLINK"; then
14584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14585$as_echo "$READLINK" >&6; }
14586else
14587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14588$as_echo "no" >&6; }
14589fi
14590
14591
14592  test -n "$READLINK" && break
14593done
14594
14595    else
14596      # If it succeeded, then it was overridden by the user. We will use it
14597      # for the tool.
14598
14599      # First remove it from the list of overridden variables, so we can test
14600      # for unknown variables in the end.
14601      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14602
14603      # Check if we try to supply an empty value
14604      if test "x$READLINK" = x; then
14605        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14606$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14607        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14608$as_echo_n "checking for READLINK... " >&6; }
14609        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14610$as_echo "disabled" >&6; }
14611      else
14612        # Check if the provided tool contains a complete path.
14613        tool_specified="$READLINK"
14614        tool_basename="${tool_specified##*/}"
14615        if test "x$tool_basename" = "x$tool_specified"; then
14616          # A command without a complete path is provided, search $PATH.
14617          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14618$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14619          # Extract the first word of "$tool_basename", so it can be a program name with args.
14620set dummy $tool_basename; ac_word=$2
14621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14622$as_echo_n "checking for $ac_word... " >&6; }
14623if ${ac_cv_path_READLINK+:} false; then :
14624  $as_echo_n "(cached) " >&6
14625else
14626  case $READLINK in
14627  [\\/]* | ?:[\\/]*)
14628  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14629  ;;
14630  *)
14631  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14632for as_dir in $PATH
14633do
14634  IFS=$as_save_IFS
14635  test -z "$as_dir" && as_dir=.
14636    for ac_exec_ext in '' $ac_executable_extensions; do
14637  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14638    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14640    break 2
14641  fi
14642done
14643  done
14644IFS=$as_save_IFS
14645
14646  ;;
14647esac
14648fi
14649READLINK=$ac_cv_path_READLINK
14650if test -n "$READLINK"; then
14651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14652$as_echo "$READLINK" >&6; }
14653else
14654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14655$as_echo "no" >&6; }
14656fi
14657
14658
14659          if test "x$READLINK" = x; then
14660            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14661          fi
14662        else
14663          # Otherwise we believe it is a complete path. Use it as it is.
14664          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14665$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14666          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14667$as_echo_n "checking for READLINK... " >&6; }
14668          if test ! -x "$tool_specified"; then
14669            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14670$as_echo "not found" >&6; }
14671            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14672          fi
14673          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14674$as_echo "$tool_specified" >&6; }
14675        fi
14676      fi
14677    fi
14678
14679  fi
14680
14681
14682
14683
14684  # Publish this variable in the help.
14685
14686
14687  if [ -z "${DF+x}" ]; then
14688    # The variable is not set by user, try to locate tool using the code snippet
14689    for ac_prog in df
14690do
14691  # Extract the first word of "$ac_prog", so it can be a program name with args.
14692set dummy $ac_prog; ac_word=$2
14693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14694$as_echo_n "checking for $ac_word... " >&6; }
14695if ${ac_cv_path_DF+:} false; then :
14696  $as_echo_n "(cached) " >&6
14697else
14698  case $DF in
14699  [\\/]* | ?:[\\/]*)
14700  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14701  ;;
14702  *)
14703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14704for as_dir in $PATH
14705do
14706  IFS=$as_save_IFS
14707  test -z "$as_dir" && as_dir=.
14708    for ac_exec_ext in '' $ac_executable_extensions; do
14709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14710    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14712    break 2
14713  fi
14714done
14715  done
14716IFS=$as_save_IFS
14717
14718  ;;
14719esac
14720fi
14721DF=$ac_cv_path_DF
14722if test -n "$DF"; then
14723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14724$as_echo "$DF" >&6; }
14725else
14726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14727$as_echo "no" >&6; }
14728fi
14729
14730
14731  test -n "$DF" && break
14732done
14733
14734  else
14735    # The variable is set, but is it from the command line or the environment?
14736
14737    # Try to remove the string !DF! from our list.
14738    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14739    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14740      # If it failed, the variable was not from the command line. Ignore it,
14741      # but warn the user (except for BASH, which is always set by the calling BASH).
14742      if test "xDF" != xBASH; then
14743        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14744$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14745      fi
14746      # Try to locate tool using the code snippet
14747      for ac_prog in df
14748do
14749  # Extract the first word of "$ac_prog", so it can be a program name with args.
14750set dummy $ac_prog; ac_word=$2
14751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14752$as_echo_n "checking for $ac_word... " >&6; }
14753if ${ac_cv_path_DF+:} false; then :
14754  $as_echo_n "(cached) " >&6
14755else
14756  case $DF in
14757  [\\/]* | ?:[\\/]*)
14758  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14759  ;;
14760  *)
14761  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14762for as_dir in $PATH
14763do
14764  IFS=$as_save_IFS
14765  test -z "$as_dir" && as_dir=.
14766    for ac_exec_ext in '' $ac_executable_extensions; do
14767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14768    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14770    break 2
14771  fi
14772done
14773  done
14774IFS=$as_save_IFS
14775
14776  ;;
14777esac
14778fi
14779DF=$ac_cv_path_DF
14780if test -n "$DF"; then
14781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14782$as_echo "$DF" >&6; }
14783else
14784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14785$as_echo "no" >&6; }
14786fi
14787
14788
14789  test -n "$DF" && break
14790done
14791
14792    else
14793      # If it succeeded, then it was overridden by the user. We will use it
14794      # for the tool.
14795
14796      # First remove it from the list of overridden variables, so we can test
14797      # for unknown variables in the end.
14798      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14799
14800      # Check if we try to supply an empty value
14801      if test "x$DF" = x; then
14802        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14803$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14804        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14805$as_echo_n "checking for DF... " >&6; }
14806        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14807$as_echo "disabled" >&6; }
14808      else
14809        # Check if the provided tool contains a complete path.
14810        tool_specified="$DF"
14811        tool_basename="${tool_specified##*/}"
14812        if test "x$tool_basename" = "x$tool_specified"; then
14813          # A command without a complete path is provided, search $PATH.
14814          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14815$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14816          # Extract the first word of "$tool_basename", so it can be a program name with args.
14817set dummy $tool_basename; ac_word=$2
14818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14819$as_echo_n "checking for $ac_word... " >&6; }
14820if ${ac_cv_path_DF+:} false; then :
14821  $as_echo_n "(cached) " >&6
14822else
14823  case $DF in
14824  [\\/]* | ?:[\\/]*)
14825  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14826  ;;
14827  *)
14828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14829for as_dir in $PATH
14830do
14831  IFS=$as_save_IFS
14832  test -z "$as_dir" && as_dir=.
14833    for ac_exec_ext in '' $ac_executable_extensions; do
14834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14835    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14837    break 2
14838  fi
14839done
14840  done
14841IFS=$as_save_IFS
14842
14843  ;;
14844esac
14845fi
14846DF=$ac_cv_path_DF
14847if test -n "$DF"; then
14848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14849$as_echo "$DF" >&6; }
14850else
14851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14852$as_echo "no" >&6; }
14853fi
14854
14855
14856          if test "x$DF" = x; then
14857            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14858          fi
14859        else
14860          # Otherwise we believe it is a complete path. Use it as it is.
14861          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14862$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14863          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14864$as_echo_n "checking for DF... " >&6; }
14865          if test ! -x "$tool_specified"; then
14866            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14867$as_echo "not found" >&6; }
14868            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14869          fi
14870          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14871$as_echo "$tool_specified" >&6; }
14872        fi
14873      fi
14874    fi
14875
14876  fi
14877
14878
14879
14880
14881  # Publish this variable in the help.
14882
14883
14884  if [ -z "${CPIO+x}" ]; then
14885    # The variable is not set by user, try to locate tool using the code snippet
14886    for ac_prog in cpio bsdcpio
14887do
14888  # Extract the first word of "$ac_prog", so it can be a program name with args.
14889set dummy $ac_prog; ac_word=$2
14890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14891$as_echo_n "checking for $ac_word... " >&6; }
14892if ${ac_cv_path_CPIO+:} false; then :
14893  $as_echo_n "(cached) " >&6
14894else
14895  case $CPIO in
14896  [\\/]* | ?:[\\/]*)
14897  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14898  ;;
14899  *)
14900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14901for as_dir in $PATH
14902do
14903  IFS=$as_save_IFS
14904  test -z "$as_dir" && as_dir=.
14905    for ac_exec_ext in '' $ac_executable_extensions; do
14906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14907    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14909    break 2
14910  fi
14911done
14912  done
14913IFS=$as_save_IFS
14914
14915  ;;
14916esac
14917fi
14918CPIO=$ac_cv_path_CPIO
14919if test -n "$CPIO"; then
14920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14921$as_echo "$CPIO" >&6; }
14922else
14923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14924$as_echo "no" >&6; }
14925fi
14926
14927
14928  test -n "$CPIO" && break
14929done
14930
14931  else
14932    # The variable is set, but is it from the command line or the environment?
14933
14934    # Try to remove the string !CPIO! from our list.
14935    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14936    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14937      # If it failed, the variable was not from the command line. Ignore it,
14938      # but warn the user (except for BASH, which is always set by the calling BASH).
14939      if test "xCPIO" != xBASH; then
14940        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14941$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14942      fi
14943      # Try to locate tool using the code snippet
14944      for ac_prog in cpio bsdcpio
14945do
14946  # Extract the first word of "$ac_prog", so it can be a program name with args.
14947set dummy $ac_prog; ac_word=$2
14948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14949$as_echo_n "checking for $ac_word... " >&6; }
14950if ${ac_cv_path_CPIO+:} false; then :
14951  $as_echo_n "(cached) " >&6
14952else
14953  case $CPIO in
14954  [\\/]* | ?:[\\/]*)
14955  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14956  ;;
14957  *)
14958  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14959for as_dir in $PATH
14960do
14961  IFS=$as_save_IFS
14962  test -z "$as_dir" && as_dir=.
14963    for ac_exec_ext in '' $ac_executable_extensions; do
14964  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14965    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14966    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14967    break 2
14968  fi
14969done
14970  done
14971IFS=$as_save_IFS
14972
14973  ;;
14974esac
14975fi
14976CPIO=$ac_cv_path_CPIO
14977if test -n "$CPIO"; then
14978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14979$as_echo "$CPIO" >&6; }
14980else
14981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14982$as_echo "no" >&6; }
14983fi
14984
14985
14986  test -n "$CPIO" && break
14987done
14988
14989    else
14990      # If it succeeded, then it was overridden by the user. We will use it
14991      # for the tool.
14992
14993      # First remove it from the list of overridden variables, so we can test
14994      # for unknown variables in the end.
14995      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14996
14997      # Check if we try to supply an empty value
14998      if test "x$CPIO" = x; then
14999        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15000$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15001        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15002$as_echo_n "checking for CPIO... " >&6; }
15003        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15004$as_echo "disabled" >&6; }
15005      else
15006        # Check if the provided tool contains a complete path.
15007        tool_specified="$CPIO"
15008        tool_basename="${tool_specified##*/}"
15009        if test "x$tool_basename" = "x$tool_specified"; then
15010          # A command without a complete path is provided, search $PATH.
15011          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15012$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15013          # Extract the first word of "$tool_basename", so it can be a program name with args.
15014set dummy $tool_basename; ac_word=$2
15015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15016$as_echo_n "checking for $ac_word... " >&6; }
15017if ${ac_cv_path_CPIO+:} false; then :
15018  $as_echo_n "(cached) " >&6
15019else
15020  case $CPIO in
15021  [\\/]* | ?:[\\/]*)
15022  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15023  ;;
15024  *)
15025  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15026for as_dir in $PATH
15027do
15028  IFS=$as_save_IFS
15029  test -z "$as_dir" && as_dir=.
15030    for ac_exec_ext in '' $ac_executable_extensions; do
15031  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15032    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15034    break 2
15035  fi
15036done
15037  done
15038IFS=$as_save_IFS
15039
15040  ;;
15041esac
15042fi
15043CPIO=$ac_cv_path_CPIO
15044if test -n "$CPIO"; then
15045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15046$as_echo "$CPIO" >&6; }
15047else
15048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15049$as_echo "no" >&6; }
15050fi
15051
15052
15053          if test "x$CPIO" = x; then
15054            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15055          fi
15056        else
15057          # Otherwise we believe it is a complete path. Use it as it is.
15058          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15059$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15060          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15061$as_echo_n "checking for CPIO... " >&6; }
15062          if test ! -x "$tool_specified"; then
15063            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15064$as_echo "not found" >&6; }
15065            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15066          fi
15067          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15068$as_echo "$tool_specified" >&6; }
15069        fi
15070      fi
15071    fi
15072
15073  fi
15074
15075
15076
15077
15078  # Publish this variable in the help.
15079
15080
15081  if [ -z "${NICE+x}" ]; then
15082    # The variable is not set by user, try to locate tool using the code snippet
15083    for ac_prog in nice
15084do
15085  # Extract the first word of "$ac_prog", so it can be a program name with args.
15086set dummy $ac_prog; ac_word=$2
15087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15088$as_echo_n "checking for $ac_word... " >&6; }
15089if ${ac_cv_path_NICE+:} false; then :
15090  $as_echo_n "(cached) " >&6
15091else
15092  case $NICE in
15093  [\\/]* | ?:[\\/]*)
15094  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15095  ;;
15096  *)
15097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15098for as_dir in $PATH
15099do
15100  IFS=$as_save_IFS
15101  test -z "$as_dir" && as_dir=.
15102    for ac_exec_ext in '' $ac_executable_extensions; do
15103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15104    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15106    break 2
15107  fi
15108done
15109  done
15110IFS=$as_save_IFS
15111
15112  ;;
15113esac
15114fi
15115NICE=$ac_cv_path_NICE
15116if test -n "$NICE"; then
15117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15118$as_echo "$NICE" >&6; }
15119else
15120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15121$as_echo "no" >&6; }
15122fi
15123
15124
15125  test -n "$NICE" && break
15126done
15127
15128  else
15129    # The variable is set, but is it from the command line or the environment?
15130
15131    # Try to remove the string !NICE! from our list.
15132    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15133    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15134      # If it failed, the variable was not from the command line. Ignore it,
15135      # but warn the user (except for BASH, which is always set by the calling BASH).
15136      if test "xNICE" != xBASH; then
15137        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15138$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15139      fi
15140      # Try to locate tool using the code snippet
15141      for ac_prog in nice
15142do
15143  # Extract the first word of "$ac_prog", so it can be a program name with args.
15144set dummy $ac_prog; ac_word=$2
15145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15146$as_echo_n "checking for $ac_word... " >&6; }
15147if ${ac_cv_path_NICE+:} false; then :
15148  $as_echo_n "(cached) " >&6
15149else
15150  case $NICE in
15151  [\\/]* | ?:[\\/]*)
15152  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15153  ;;
15154  *)
15155  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15156for as_dir in $PATH
15157do
15158  IFS=$as_save_IFS
15159  test -z "$as_dir" && as_dir=.
15160    for ac_exec_ext in '' $ac_executable_extensions; do
15161  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15162    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15164    break 2
15165  fi
15166done
15167  done
15168IFS=$as_save_IFS
15169
15170  ;;
15171esac
15172fi
15173NICE=$ac_cv_path_NICE
15174if test -n "$NICE"; then
15175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15176$as_echo "$NICE" >&6; }
15177else
15178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15179$as_echo "no" >&6; }
15180fi
15181
15182
15183  test -n "$NICE" && break
15184done
15185
15186    else
15187      # If it succeeded, then it was overridden by the user. We will use it
15188      # for the tool.
15189
15190      # First remove it from the list of overridden variables, so we can test
15191      # for unknown variables in the end.
15192      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15193
15194      # Check if we try to supply an empty value
15195      if test "x$NICE" = x; then
15196        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15197$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15198        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15199$as_echo_n "checking for NICE... " >&6; }
15200        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15201$as_echo "disabled" >&6; }
15202      else
15203        # Check if the provided tool contains a complete path.
15204        tool_specified="$NICE"
15205        tool_basename="${tool_specified##*/}"
15206        if test "x$tool_basename" = "x$tool_specified"; then
15207          # A command without a complete path is provided, search $PATH.
15208          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15209$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15210          # Extract the first word of "$tool_basename", so it can be a program name with args.
15211set dummy $tool_basename; ac_word=$2
15212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15213$as_echo_n "checking for $ac_word... " >&6; }
15214if ${ac_cv_path_NICE+:} false; then :
15215  $as_echo_n "(cached) " >&6
15216else
15217  case $NICE in
15218  [\\/]* | ?:[\\/]*)
15219  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15220  ;;
15221  *)
15222  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15223for as_dir in $PATH
15224do
15225  IFS=$as_save_IFS
15226  test -z "$as_dir" && as_dir=.
15227    for ac_exec_ext in '' $ac_executable_extensions; do
15228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15229    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15231    break 2
15232  fi
15233done
15234  done
15235IFS=$as_save_IFS
15236
15237  ;;
15238esac
15239fi
15240NICE=$ac_cv_path_NICE
15241if test -n "$NICE"; then
15242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15243$as_echo "$NICE" >&6; }
15244else
15245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15246$as_echo "no" >&6; }
15247fi
15248
15249
15250          if test "x$NICE" = x; then
15251            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15252          fi
15253        else
15254          # Otherwise we believe it is a complete path. Use it as it is.
15255          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15256$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15257          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15258$as_echo_n "checking for NICE... " >&6; }
15259          if test ! -x "$tool_specified"; then
15260            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15261$as_echo "not found" >&6; }
15262            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15263          fi
15264          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15265$as_echo "$tool_specified" >&6; }
15266        fi
15267      fi
15268    fi
15269
15270  fi
15271
15272
15273
15274
15275# Now we can determine OpenJDK build and target platforms. This is required to
15276# have early on.
15277# Make sure we can run config.sub.
15278$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15279  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15280
15281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15282$as_echo_n "checking build system type... " >&6; }
15283if ${ac_cv_build+:} false; then :
15284  $as_echo_n "(cached) " >&6
15285else
15286  ac_build_alias=$build_alias
15287test "x$ac_build_alias" = x &&
15288  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15289test "x$ac_build_alias" = x &&
15290  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15291ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15292  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15293
15294fi
15295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15296$as_echo "$ac_cv_build" >&6; }
15297case $ac_cv_build in
15298*-*-*) ;;
15299*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15300esac
15301build=$ac_cv_build
15302ac_save_IFS=$IFS; IFS='-'
15303set x $ac_cv_build
15304shift
15305build_cpu=$1
15306build_vendor=$2
15307shift; shift
15308# Remember, the first character of IFS is used to create $*,
15309# except with old shells:
15310build_os=$*
15311IFS=$ac_save_IFS
15312case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15313
15314
15315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15316$as_echo_n "checking host system type... " >&6; }
15317if ${ac_cv_host+:} false; then :
15318  $as_echo_n "(cached) " >&6
15319else
15320  if test "x$host_alias" = x; then
15321  ac_cv_host=$ac_cv_build
15322else
15323  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15324    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15325fi
15326
15327fi
15328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15329$as_echo "$ac_cv_host" >&6; }
15330case $ac_cv_host in
15331*-*-*) ;;
15332*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15333esac
15334host=$ac_cv_host
15335ac_save_IFS=$IFS; IFS='-'
15336set x $ac_cv_host
15337shift
15338host_cpu=$1
15339host_vendor=$2
15340shift; shift
15341# Remember, the first character of IFS is used to create $*,
15342# except with old shells:
15343host_os=$*
15344IFS=$ac_save_IFS
15345case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15346
15347
15348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15349$as_echo_n "checking target system type... " >&6; }
15350if ${ac_cv_target+:} false; then :
15351  $as_echo_n "(cached) " >&6
15352else
15353  if test "x$target_alias" = x; then
15354  ac_cv_target=$ac_cv_host
15355else
15356  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15357    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15358fi
15359
15360fi
15361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15362$as_echo "$ac_cv_target" >&6; }
15363case $ac_cv_target in
15364*-*-*) ;;
15365*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15366esac
15367target=$ac_cv_target
15368ac_save_IFS=$IFS; IFS='-'
15369set x $ac_cv_target
15370shift
15371target_cpu=$1
15372target_vendor=$2
15373shift; shift
15374# Remember, the first character of IFS is used to create $*,
15375# except with old shells:
15376target_os=$*
15377IFS=$ac_save_IFS
15378case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15379
15380
15381# The aliases save the names the user supplied, while $host etc.
15382# will get canonicalized.
15383test -n "$target_alias" &&
15384  test "$program_prefix$program_suffix$program_transform_name" = \
15385    NONENONEs,x,x, &&
15386  program_prefix=${target_alias}-
15387
15388  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15389  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15390  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15391  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15392  # to use the configure naming style.
15393
15394
15395
15396
15397
15398  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15399  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15400  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15401  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15402  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15403  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15404
15405
15406
15407  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15408
15409  case "$build_os" in
15410    *linux*)
15411      VAR_OS=linux
15412      VAR_OS_TYPE=unix
15413      ;;
15414    *solaris*)
15415      VAR_OS=solaris
15416      VAR_OS_TYPE=unix
15417      ;;
15418    *darwin*)
15419      VAR_OS=macosx
15420      VAR_OS_TYPE=unix
15421      ;;
15422    *bsd*)
15423      VAR_OS=bsd
15424      VAR_OS_TYPE=unix
15425      ;;
15426    *cygwin*)
15427      VAR_OS=windows
15428      VAR_OS_ENV=windows.cygwin
15429      ;;
15430    *mingw*)
15431      VAR_OS=windows
15432      VAR_OS_ENV=windows.msys
15433      ;;
15434    *aix*)
15435      VAR_OS=aix
15436      VAR_OS_TYPE=unix
15437      ;;
15438    *)
15439      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15440      ;;
15441  esac
15442
15443
15444  # First argument is the cpu name from the trip/quad
15445  case "$build_cpu" in
15446    x86_64)
15447      VAR_CPU=x86_64
15448      VAR_CPU_ARCH=x86
15449      VAR_CPU_BITS=64
15450      VAR_CPU_ENDIAN=little
15451      ;;
15452    i?86)
15453      VAR_CPU=x86
15454      VAR_CPU_ARCH=x86
15455      VAR_CPU_BITS=32
15456      VAR_CPU_ENDIAN=little
15457      ;;
15458    arm*)
15459      VAR_CPU=arm
15460      VAR_CPU_ARCH=arm
15461      VAR_CPU_BITS=32
15462      VAR_CPU_ENDIAN=little
15463      ;;
15464    aarch64)
15465      VAR_CPU=aarch64
15466      VAR_CPU_ARCH=aarch64
15467      VAR_CPU_BITS=64
15468      VAR_CPU_ENDIAN=little
15469      ;;
15470    powerpc)
15471      VAR_CPU=ppc
15472      VAR_CPU_ARCH=ppc
15473      VAR_CPU_BITS=32
15474      VAR_CPU_ENDIAN=big
15475      ;;
15476    powerpc64)
15477      VAR_CPU=ppc64
15478      VAR_CPU_ARCH=ppc
15479      VAR_CPU_BITS=64
15480      VAR_CPU_ENDIAN=big
15481      ;;
15482    powerpc64le)
15483      VAR_CPU=ppc64le
15484      VAR_CPU_ARCH=ppc
15485      VAR_CPU_BITS=64
15486      VAR_CPU_ENDIAN=little
15487      ;;
15488    s390)
15489      VAR_CPU=s390
15490      VAR_CPU_ARCH=s390
15491      VAR_CPU_BITS=32
15492      VAR_CPU_ENDIAN=big
15493      ;;
15494    s390x)
15495      VAR_CPU=s390x
15496      VAR_CPU_ARCH=s390
15497      VAR_CPU_BITS=64
15498      VAR_CPU_ENDIAN=big
15499      ;;
15500    sparc)
15501      VAR_CPU=sparc
15502      VAR_CPU_ARCH=sparc
15503      VAR_CPU_BITS=32
15504      VAR_CPU_ENDIAN=big
15505      ;;
15506    sparcv9|sparc64)
15507      VAR_CPU=sparcv9
15508      VAR_CPU_ARCH=sparc
15509      VAR_CPU_BITS=64
15510      VAR_CPU_ENDIAN=big
15511      ;;
15512    *)
15513      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15514      ;;
15515  esac
15516
15517  # ..and setup our own variables. (Do this explicitely to facilitate searching)
15518  OPENJDK_BUILD_OS="$VAR_OS"
15519  if test "x$VAR_OS_TYPE" != x; then
15520    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15521  else
15522    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15523  fi
15524  if test "x$VAR_OS_ENV" != x; then
15525    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15526  else
15527    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15528  fi
15529  OPENJDK_BUILD_CPU="$VAR_CPU"
15530  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15531  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15532  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15533
15534
15535
15536
15537
15538
15539
15540
15541  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15542$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15544$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15545
15546  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15547
15548  case "$host_os" in
15549    *linux*)
15550      VAR_OS=linux
15551      VAR_OS_TYPE=unix
15552      ;;
15553    *solaris*)
15554      VAR_OS=solaris
15555      VAR_OS_TYPE=unix
15556      ;;
15557    *darwin*)
15558      VAR_OS=macosx
15559      VAR_OS_TYPE=unix
15560      ;;
15561    *bsd*)
15562      VAR_OS=bsd
15563      VAR_OS_TYPE=unix
15564      ;;
15565    *cygwin*)
15566      VAR_OS=windows
15567      VAR_OS_ENV=windows.cygwin
15568      ;;
15569    *mingw*)
15570      VAR_OS=windows
15571      VAR_OS_ENV=windows.msys
15572      ;;
15573    *aix*)
15574      VAR_OS=aix
15575      VAR_OS_TYPE=unix
15576      ;;
15577    *)
15578      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15579      ;;
15580  esac
15581
15582
15583  # First argument is the cpu name from the trip/quad
15584  case "$host_cpu" in
15585    x86_64)
15586      VAR_CPU=x86_64
15587      VAR_CPU_ARCH=x86
15588      VAR_CPU_BITS=64
15589      VAR_CPU_ENDIAN=little
15590      ;;
15591    i?86)
15592      VAR_CPU=x86
15593      VAR_CPU_ARCH=x86
15594      VAR_CPU_BITS=32
15595      VAR_CPU_ENDIAN=little
15596      ;;
15597    arm*)
15598      VAR_CPU=arm
15599      VAR_CPU_ARCH=arm
15600      VAR_CPU_BITS=32
15601      VAR_CPU_ENDIAN=little
15602      ;;
15603    aarch64)
15604      VAR_CPU=aarch64
15605      VAR_CPU_ARCH=aarch64
15606      VAR_CPU_BITS=64
15607      VAR_CPU_ENDIAN=little
15608      ;;
15609    powerpc)
15610      VAR_CPU=ppc
15611      VAR_CPU_ARCH=ppc
15612      VAR_CPU_BITS=32
15613      VAR_CPU_ENDIAN=big
15614      ;;
15615    powerpc64)
15616      VAR_CPU=ppc64
15617      VAR_CPU_ARCH=ppc
15618      VAR_CPU_BITS=64
15619      VAR_CPU_ENDIAN=big
15620      ;;
15621    powerpc64le)
15622      VAR_CPU=ppc64le
15623      VAR_CPU_ARCH=ppc
15624      VAR_CPU_BITS=64
15625      VAR_CPU_ENDIAN=little
15626      ;;
15627    s390)
15628      VAR_CPU=s390
15629      VAR_CPU_ARCH=s390
15630      VAR_CPU_BITS=32
15631      VAR_CPU_ENDIAN=big
15632      ;;
15633    s390x)
15634      VAR_CPU=s390x
15635      VAR_CPU_ARCH=s390
15636      VAR_CPU_BITS=64
15637      VAR_CPU_ENDIAN=big
15638      ;;
15639    sparc)
15640      VAR_CPU=sparc
15641      VAR_CPU_ARCH=sparc
15642      VAR_CPU_BITS=32
15643      VAR_CPU_ENDIAN=big
15644      ;;
15645    sparcv9|sparc64)
15646      VAR_CPU=sparcv9
15647      VAR_CPU_ARCH=sparc
15648      VAR_CPU_BITS=64
15649      VAR_CPU_ENDIAN=big
15650      ;;
15651    *)
15652      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15653      ;;
15654  esac
15655
15656  # ... and setup our own variables. (Do this explicitely to facilitate searching)
15657  OPENJDK_TARGET_OS="$VAR_OS"
15658  if test "x$VAR_OS_TYPE" != x; then
15659    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15660  else
15661    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15662  fi
15663  if test "x$VAR_OS_ENV" != x; then
15664    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15665  else
15666    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15667  fi
15668  OPENJDK_TARGET_CPU="$VAR_CPU"
15669  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15670  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15671  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15672
15673
15674
15675
15676
15677
15678
15679
15680  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15681$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15683$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15684
15685
15686
15687# Check whether --with-target-bits was given.
15688if test "${with_target_bits+set}" = set; then :
15689  withval=$with_target_bits;
15690fi
15691
15692
15693  # We have three types of compiles:
15694  # native  == normal compilation, target system == build system
15695  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15696  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15697  #
15698  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15699    # We're doing a proper cross-compilation
15700    COMPILE_TYPE="cross"
15701  else
15702    COMPILE_TYPE="native"
15703  fi
15704
15705  if test "x$with_target_bits" != x; then
15706    if test "x$COMPILE_TYPE" = "xcross"; then
15707      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15708    fi
15709
15710    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15711      # A reduced build is requested
15712      COMPILE_TYPE="reduced"
15713      OPENJDK_TARGET_CPU_BITS=32
15714      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15715        OPENJDK_TARGET_CPU=x86
15716      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15717        OPENJDK_TARGET_CPU=sparc
15718      else
15719        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15720      fi
15721    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15722      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
15723    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15724      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15725$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15726    else
15727      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15728    fi
15729  fi
15730
15731
15732  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15733$as_echo_n "checking compilation type... " >&6; }
15734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15735$as_echo "$COMPILE_TYPE" >&6; }
15736
15737
15738  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15739    REQUIRED_OS_NAME=SunOS
15740    REQUIRED_OS_VERSION=5.10
15741  fi
15742  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15743    REQUIRED_OS_NAME=Linux
15744    REQUIRED_OS_VERSION=2.6
15745  fi
15746  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15747    REQUIRED_OS_NAME=Windows
15748    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15749      REQUIRED_OS_VERSION=5.2
15750    else
15751      REQUIRED_OS_VERSION=5.1
15752    fi
15753  fi
15754  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15755    REQUIRED_OS_NAME=Darwin
15756    REQUIRED_OS_VERSION=11.2
15757  fi
15758  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15759    REQUIRED_OS_NAME=AIX
15760    REQUIRED_OS_VERSION=7.1
15761  fi
15762
15763
15764
15765
15766
15767
15768  # Also store the legacy naming of the cpu.
15769  # Ie i586 and amd64 instead of x86 and x86_64
15770  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15771  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15772    OPENJDK_TARGET_CPU_LEGACY="i586"
15773  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15774    # On all platforms except MacOSX replace x86_64 with amd64.
15775    OPENJDK_TARGET_CPU_LEGACY="amd64"
15776  fi
15777
15778
15779  # And the second legacy naming of the cpu.
15780  # Ie i386 and amd64 instead of x86 and x86_64.
15781  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15782  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15783    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15784  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15785    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15786  fi
15787
15788
15789  # This is the name of the cpu (but using i386 and amd64 instead of
15790  # x86 and x86_64, respectively), preceeded by a /, to be used when
15791  # locating libraries. On macosx, it's empty, though.
15792  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15793  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15794    OPENJDK_TARGET_CPU_LIBDIR=""
15795  fi
15796
15797
15798  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15799  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15800  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15801  OPENJDK_TARGET_CPU_ISADIR=""
15802  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15803    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15804      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15805    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15806      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15807    fi
15808  fi
15809
15810
15811  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15812  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15813  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15814    # On linux only, we replace x86 with i386.
15815    OPENJDK_TARGET_CPU_OSARCH="i386"
15816  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15817    # On all platforms except macosx, we replace x86_64 with amd64.
15818    OPENJDK_TARGET_CPU_OSARCH="amd64"
15819  fi
15820
15821
15822  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15823  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15824    OPENJDK_TARGET_CPU_JLI="i386"
15825  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15826    # On all platforms except macosx, we replace x86_64 with amd64.
15827    OPENJDK_TARGET_CPU_JLI="amd64"
15828  fi
15829  # Now setup the -D flags for building libjli.
15830  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15831  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15832    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15833      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15834    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15835      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15836    fi
15837  fi
15838
15839
15840  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15841      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15842  else
15843      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15844  fi
15845
15846
15847  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
15848  # Macosx is osx and x86_64 is x64
15849  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15850    OPENJDK_TARGET_OS_BUNDLE="osx"
15851  else
15852    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
15853  fi
15854  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15855    OPENJDK_TARGET_CPU_BUNDLE="x64"
15856  else
15857    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
15858  fi
15859  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
15860
15861
15862
15863
15864  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15865    A_LP64="LP64:="
15866    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15867    # unpack200.exe
15868    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15869      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15870    fi
15871  fi
15872  LP64=$A_LP64
15873
15874
15875  if test "x$COMPILE_TYPE" = "xcross"; then
15876    # FIXME: ... or should this include reduced builds..?
15877    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15878  else
15879    DEFINE_CROSS_COMPILE_ARCH=""
15880  fi
15881
15882
15883  # Convert openjdk platform names to hotspot names
15884
15885  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15886  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15887    HOTSPOT_TARGET_OS=bsd
15888  fi
15889
15890
15891  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15892  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15893    HOTSPOT_TARGET_OS_TYPE=posix
15894  fi
15895
15896
15897  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15898  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15899    HOTSPOT_TARGET_CPU=x86_32
15900  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15901    HOTSPOT_TARGET_CPU=sparc
15902  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15903    HOTSPOT_TARGET_CPU=ppc_64
15904  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15905    HOTSPOT_TARGET_CPU=ppc_64
15906  fi
15907
15908
15909  # This is identical with OPENJDK_*, but define anyway for consistency.
15910  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15911
15912
15913  # Setup HOTSPOT_TARGET_CPU_DEFINE
15914  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15915    HOTSPOT_TARGET_CPU_DEFINE=IA32
15916  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15917    HOTSPOT_TARGET_CPU_DEFINE=AMD64
15918  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15919    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15920  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15921    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15922  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15923    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15924  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15925    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15926
15927  # The cpu defines below are for zero, we don't support them directly.
15928  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15929    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15930  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15931    HOTSPOT_TARGET_CPU_DEFINE=PPC32
15932  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15933    HOTSPOT_TARGET_CPU_DEFINE=S390
15934  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
15935    HOTSPOT_TARGET_CPU_DEFINE=S390
15936  elif test "x$OPENJDK_TARGET_CPU" != x; then
15937    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
15938  fi
15939
15940
15941
15942
15943  # Also store the legacy naming of the cpu.
15944  # Ie i586 and amd64 instead of x86 and x86_64
15945  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15946  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15947    OPENJDK_BUILD_CPU_LEGACY="i586"
15948  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15949    # On all platforms except MacOSX replace x86_64 with amd64.
15950    OPENJDK_BUILD_CPU_LEGACY="amd64"
15951  fi
15952
15953
15954  # And the second legacy naming of the cpu.
15955  # Ie i386 and amd64 instead of x86 and x86_64.
15956  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15957  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15958    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15959  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15960    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
15961  fi
15962
15963
15964  # This is the name of the cpu (but using i386 and amd64 instead of
15965  # x86 and x86_64, respectively), preceeded by a /, to be used when
15966  # locating libraries. On macosx, it's empty, though.
15967  OPENJDK_BUILD_CPU_LIBDIR="/$OPENJDK_BUILD_CPU_LEGACY_LIB"
15968  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15969    OPENJDK_BUILD_CPU_LIBDIR=""
15970  fi
15971
15972
15973  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15974  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15975  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
15976  OPENJDK_BUILD_CPU_ISADIR=""
15977  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15978    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15979      OPENJDK_BUILD_CPU_ISADIR="/amd64"
15980    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15981      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
15982    fi
15983  fi
15984
15985
15986  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
15987  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
15988  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
15989    # On linux only, we replace x86 with i386.
15990    OPENJDK_BUILD_CPU_OSARCH="i386"
15991  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15992    # On all platforms except macosx, we replace x86_64 with amd64.
15993    OPENJDK_BUILD_CPU_OSARCH="amd64"
15994  fi
15995
15996
15997  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
15998  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15999    OPENJDK_BUILD_CPU_JLI="i386"
16000  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16001    # On all platforms except macosx, we replace x86_64 with amd64.
16002    OPENJDK_BUILD_CPU_JLI="amd64"
16003  fi
16004  # Now setup the -D flags for building libjli.
16005  OPENJDK_BUILD_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_BUILD_CPU_JLI\"'"
16006  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16007    if test "x$OPENJDK_BUILD_CPU_ARCH" = xsparc; then
16008      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
16009    elif test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
16010      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
16011    fi
16012  fi
16013
16014
16015  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16016      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16017  else
16018      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16019  fi
16020
16021
16022  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16023  # Macosx is osx and x86_64 is x64
16024  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16025    OPENJDK_BUILD_OS_BUNDLE="osx"
16026  else
16027    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16028  fi
16029  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16030    OPENJDK_BUILD_CPU_BUNDLE="x64"
16031  else
16032    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16033  fi
16034  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16035
16036
16037
16038
16039  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16040    A_LP64="LP64:="
16041    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16042    # unpack200.exe
16043    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16044      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16045    fi
16046  fi
16047  LP64=$A_LP64
16048
16049
16050  if test "x$COMPILE_TYPE" = "xcross"; then
16051    # FIXME: ... or should this include reduced builds..?
16052    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16053  else
16054    DEFINE_CROSS_COMPILE_ARCH=""
16055  fi
16056
16057
16058  # Convert openjdk platform names to hotspot names
16059
16060  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16061  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16062    HOTSPOT_BUILD_OS=bsd
16063  fi
16064
16065
16066  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16067  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16068    HOTSPOT_BUILD_OS_TYPE=posix
16069  fi
16070
16071
16072  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16073  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16074    HOTSPOT_BUILD_CPU=x86_32
16075  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16076    HOTSPOT_BUILD_CPU=sparc
16077  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16078    HOTSPOT_BUILD_CPU=ppc_64
16079  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16080    HOTSPOT_BUILD_CPU=ppc_64
16081  fi
16082
16083
16084  # This is identical with OPENJDK_*, but define anyway for consistency.
16085  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16086
16087
16088  # Setup HOTSPOT_BUILD_CPU_DEFINE
16089  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16090    HOTSPOT_BUILD_CPU_DEFINE=IA32
16091  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16092    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16093  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16094    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16095  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16096    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16097  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16098    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16099  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16100    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16101
16102  # The cpu defines below are for zero, we don't support them directly.
16103  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16104    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16105  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16106    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16107  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16108    HOTSPOT_BUILD_CPU_DEFINE=S390
16109  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16110    HOTSPOT_BUILD_CPU_DEFINE=S390
16111  elif test "x$OPENJDK_BUILD_CPU" != x; then
16112    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16113  fi
16114
16115
16116
16117
16118  # ZERO_ARCHDEF is used to enable architecture-specific code.
16119  # This is used in legacy hotspot build.
16120  ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
16121
16122
16123
16124
16125
16126# Continue setting up basic stuff. Most remaining code require fundamental tools.
16127
16128  # Save the current directory this script was started from
16129  CURDIR="$PWD"
16130
16131  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16132  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16133  # was not available at that time.
16134  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16135  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16136    ORIGINAL_PATH="$REWRITTEN_PATH"
16137    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16138$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16139  fi
16140
16141  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16142    PATH_SEP=";"
16143
16144  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16145  if test $SRC_ROOT_LENGTH -gt 100; then
16146    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16147  fi
16148
16149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16150    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16151$as_echo_n "checking cygwin release... " >&6; }
16152    CYGWIN_VERSION=`$UNAME -r`
16153    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16154$as_echo "$CYGWIN_VERSION" >&6; }
16155    WINDOWS_ENV_VENDOR='cygwin'
16156    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16157
16158    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16159    if test "x$CYGWIN_VERSION_OLD" != x; then
16160      { $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
16161$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;}
16162      as_fn_error $? "Cannot continue" "$LINENO" 5
16163    fi
16164    if test "x$CYGPATH" = x; then
16165      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16166    fi
16167    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16168$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16169    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16170    cygwin_winpath_root=`cd / ; cmd /c cd | $GREP ".*"`
16171    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16172    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16173    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16174$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16175    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16176    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16177    if test "x$test_cygdrive_prefix" = x; then
16178      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16179    fi
16180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16181    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16182$as_echo_n "checking msys release... " >&6; }
16183    MSYS_VERSION=`$UNAME -r`
16184    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16185$as_echo "$MSYS_VERSION" >&6; }
16186
16187    WINDOWS_ENV_VENDOR='msys'
16188    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16189
16190    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16191$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16192    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16193    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16194
16195  windows_path="$MSYS_ROOT_PATH"
16196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16197    unix_path=`$CYGPATH -u "$windows_path"`
16198    MSYS_ROOT_PATH="$unix_path"
16199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16201    MSYS_ROOT_PATH="$unix_path"
16202  fi
16203
16204    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16205$as_echo "$MSYS_ROOT_PATH" >&6; }
16206    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16207  else
16208    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16209  fi
16210
16211  # Test if windows or unix (cygwin/msys) find is first in path.
16212  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16213$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16214  FIND_BINARY_OUTPUT=`find --version 2>&1`
16215  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16216    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16217$as_echo "unix style" >&6; }
16218  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16219    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16220$as_echo "Windows" >&6; }
16221    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16222$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16223    { $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
16224$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16225    as_fn_error $? "Cannot continue" "$LINENO" 5
16226  else
16227    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16228$as_echo "unknown" >&6; }
16229    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16230$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16231  fi
16232
16233  else
16234    PATH_SEP=":"
16235  fi
16236
16237
16238  # We get the top-level directory from the supporting wrappers.
16239  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16240$as_echo_n "checking for top-level directory... " >&6; }
16241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16242$as_echo "$TOPDIR" >&6; }
16243
16244
16245  # Save the original version of TOPDIR for string comparisons
16246  ORIGINAL_TOPDIR="$TOPDIR"
16247
16248
16249  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16250
16251  # Only process if variable expands to non-empty
16252
16253  if test "x$CURDIR" != x; then
16254    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16255
16256  # Input might be given as Windows format, start by converting to
16257  # unix format.
16258  path="$CURDIR"
16259  new_path=`$CYGPATH -u "$path"`
16260
16261  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16262  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16263  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16264  # "foo.exe" is OK but "foo" is an error.
16265  #
16266  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16267  # It is also a way to make sure we got the proper file name for the real test later on.
16268  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16269  if test "x$test_shortpath" = x; then
16270    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16271$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16272    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16273  fi
16274
16275  # Call helper function which possibly converts this using DOS-style short mode.
16276  # If so, the updated path is stored in $new_path.
16277
16278  input_path="$new_path"
16279  # Check if we need to convert this using DOS-style short mode. If the path
16280  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16281  # take no chances and rewrite it.
16282  # Note: m4 eats our [], so we need to use [ and ] instead.
16283  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16284  if test "x$has_forbidden_chars" != x; then
16285    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16286    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16287    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16288    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16289      # Going to short mode and back again did indeed matter. Since short mode is
16290      # case insensitive, let's make it lowercase to improve readability.
16291      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16292      # Now convert it back to Unix-style (cygpath)
16293      input_path=`$CYGPATH -u "$shortmode_path"`
16294      new_path="$input_path"
16295    fi
16296  fi
16297
16298  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16299  if test "x$test_cygdrive_prefix" = x; then
16300    # As a simple fix, exclude /usr/bin since it's not a real path.
16301    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16302      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16303      # a path prefixed by /cygdrive for fixpath to work.
16304      new_path="$CYGWIN_ROOT_PATH$input_path"
16305    fi
16306  fi
16307
16308
16309  if test "x$path" != "x$new_path"; then
16310    CURDIR="$new_path"
16311    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16312$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16313  fi
16314
16315    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16316
16317  path="$CURDIR"
16318  has_colon=`$ECHO $path | $GREP ^.:`
16319  new_path="$path"
16320  if test "x$has_colon" = x; then
16321    # Not in mixed or Windows style, start by that.
16322    new_path=`cmd //c echo $path`
16323  fi
16324
16325
16326  input_path="$new_path"
16327  # Check if we need to convert this using DOS-style short mode. If the path
16328  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16329  # take no chances and rewrite it.
16330  # Note: m4 eats our [], so we need to use [ and ] instead.
16331  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16332  if test "x$has_forbidden_chars" != x; then
16333    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16334    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16335  fi
16336
16337
16338  windows_path="$new_path"
16339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16340    unix_path=`$CYGPATH -u "$windows_path"`
16341    new_path="$unix_path"
16342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16344    new_path="$unix_path"
16345  fi
16346
16347  if test "x$path" != "x$new_path"; then
16348    CURDIR="$new_path"
16349    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16350$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16351  fi
16352
16353  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16354  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16355
16356    else
16357      # We're on a unix platform. Hooray! :)
16358      path="$CURDIR"
16359      has_space=`$ECHO "$path" | $GREP " "`
16360      if test "x$has_space" != x; then
16361        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16362$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16363        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16364      fi
16365
16366      # Use eval to expand a potential ~
16367      eval path="$path"
16368      if test ! -f "$path" && test ! -d "$path"; then
16369        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16370      fi
16371
16372      if test -d "$path"; then
16373        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16374      else
16375        dir="`$DIRNAME "$path"`"
16376        base="`$BASENAME "$path"`"
16377        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16378      fi
16379    fi
16380  fi
16381
16382
16383  # Only process if variable expands to non-empty
16384
16385  if test "x$TOPDIR" != x; then
16386    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16387
16388  # Input might be given as Windows format, start by converting to
16389  # unix format.
16390  path="$TOPDIR"
16391  new_path=`$CYGPATH -u "$path"`
16392
16393  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16394  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16395  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16396  # "foo.exe" is OK but "foo" is an error.
16397  #
16398  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16399  # It is also a way to make sure we got the proper file name for the real test later on.
16400  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16401  if test "x$test_shortpath" = x; then
16402    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16403$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16404    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16405  fi
16406
16407  # Call helper function which possibly converts this using DOS-style short mode.
16408  # If so, the updated path is stored in $new_path.
16409
16410  input_path="$new_path"
16411  # Check if we need to convert this using DOS-style short mode. If the path
16412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16413  # take no chances and rewrite it.
16414  # Note: m4 eats our [], so we need to use [ and ] instead.
16415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16416  if test "x$has_forbidden_chars" != x; then
16417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16418    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16419    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16420    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16421      # Going to short mode and back again did indeed matter. Since short mode is
16422      # case insensitive, let's make it lowercase to improve readability.
16423      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16424      # Now convert it back to Unix-style (cygpath)
16425      input_path=`$CYGPATH -u "$shortmode_path"`
16426      new_path="$input_path"
16427    fi
16428  fi
16429
16430  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16431  if test "x$test_cygdrive_prefix" = x; then
16432    # As a simple fix, exclude /usr/bin since it's not a real path.
16433    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16434      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16435      # a path prefixed by /cygdrive for fixpath to work.
16436      new_path="$CYGWIN_ROOT_PATH$input_path"
16437    fi
16438  fi
16439
16440
16441  if test "x$path" != "x$new_path"; then
16442    TOPDIR="$new_path"
16443    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16444$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16445  fi
16446
16447    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16448
16449  path="$TOPDIR"
16450  has_colon=`$ECHO $path | $GREP ^.:`
16451  new_path="$path"
16452  if test "x$has_colon" = x; then
16453    # Not in mixed or Windows style, start by that.
16454    new_path=`cmd //c echo $path`
16455  fi
16456
16457
16458  input_path="$new_path"
16459  # Check if we need to convert this using DOS-style short mode. If the path
16460  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16461  # take no chances and rewrite it.
16462  # Note: m4 eats our [], so we need to use [ and ] instead.
16463  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16464  if test "x$has_forbidden_chars" != x; then
16465    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16466    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16467  fi
16468
16469
16470  windows_path="$new_path"
16471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16472    unix_path=`$CYGPATH -u "$windows_path"`
16473    new_path="$unix_path"
16474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16476    new_path="$unix_path"
16477  fi
16478
16479  if test "x$path" != "x$new_path"; then
16480    TOPDIR="$new_path"
16481    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16482$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16483  fi
16484
16485  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16486  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16487
16488    else
16489      # We're on a unix platform. Hooray! :)
16490      path="$TOPDIR"
16491      has_space=`$ECHO "$path" | $GREP " "`
16492      if test "x$has_space" != x; then
16493        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16494$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16495        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16496      fi
16497
16498      # Use eval to expand a potential ~
16499      eval path="$path"
16500      if test ! -f "$path" && test ! -d "$path"; then
16501        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16502      fi
16503
16504      if test -d "$path"; then
16505        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16506      else
16507        dir="`$DIRNAME "$path"`"
16508        base="`$BASENAME "$path"`"
16509        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16510      fi
16511    fi
16512  fi
16513
16514  # SRC_ROOT is a traditional alias for TOPDIR.
16515  SRC_ROOT=$TOPDIR
16516
16517  # Calculate a canonical version of TOPDIR for string comparisons
16518  CANONICAL_TOPDIR=$TOPDIR
16519
16520  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16521    # Follow a chain of symbolic links. Use readlink
16522    # where it exists, else fall back to horribly
16523    # complicated shell code.
16524    if test "x$READLINK_TESTED" != yes; then
16525      # On MacOSX there is a readlink tool with a different
16526      # purpose than the GNU readlink tool. Check the found readlink.
16527      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16528      if test "x$ISGNU" = x; then
16529        # A readlink that we do not know how to use.
16530        # Are there other non-GNU readlinks out there?
16531        READLINK_TESTED=yes
16532        READLINK=
16533      fi
16534    fi
16535
16536    if test "x$READLINK" != x; then
16537      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16538    else
16539      # Save the current directory for restoring afterwards
16540      STARTDIR=$PWD
16541      COUNTER=0
16542      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16543      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16544      cd $sym_link_dir
16545      # Use -P flag to resolve symlinks in directories.
16546      cd `$THEPWDCMD -P`
16547      sym_link_dir=`$THEPWDCMD -P`
16548      # Resolve file symlinks
16549      while test $COUNTER -lt 20; do
16550        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16551        if test "x$ISLINK" == x; then
16552          # This is not a symbolic link! We are done!
16553          break
16554        fi
16555        # Again resolve directory symlinks since the target of the just found
16556        # link could be in a different directory
16557        cd `$DIRNAME $ISLINK`
16558        sym_link_dir=`$THEPWDCMD -P`
16559        sym_link_file=`$BASENAME $ISLINK`
16560        let COUNTER=COUNTER+1
16561      done
16562      cd $STARTDIR
16563      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16564    fi
16565  fi
16566
16567
16568
16569  # Locate the directory of this script.
16570  AUTOCONF_DIR=$TOPDIR/common/autoconf
16571
16572  # Setup username (for use in adhoc version strings etc)
16573  # Outer [ ] to quote m4.
16574   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16575
16576
16577
16578# Check if it's a pure open build or if custom sources are to be used.
16579
16580  # Check whether --enable-openjdk-only was given.
16581if test "${enable_openjdk_only+set}" = set; then :
16582  enableval=$enable_openjdk_only;
16583else
16584  enable_openjdk_only="no"
16585fi
16586
16587
16588  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16589$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16591$as_echo "$enable_openjdk_only" >&6; }
16592  if test "x$enable_openjdk_only" = "xyes"; then
16593    SUPPRESS_CUSTOM_EXTENSIONS="true"
16594  elif test "x$enable_openjdk_only" = "xno"; then
16595    SUPPRESS_CUSTOM_EXTENSIONS="false"
16596  else
16597    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16598  fi
16599
16600  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16601  # the IncludeCustomExtension macro.
16602
16603
16604# Check whether --with-custom-make-dir was given.
16605if test "${with_custom_make_dir+set}" = set; then :
16606  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
16607$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16608fi
16609
16610
16611
16612
16613# These are needed to be able to create a configuration name (and thus the output directory)
16614
16615  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16616$as_echo_n "checking which variant of the JDK to build... " >&6; }
16617
16618# Check whether --with-jdk-variant was given.
16619if test "${with_jdk_variant+set}" = set; then :
16620  withval=$with_jdk_variant;
16621fi
16622
16623
16624  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16625    JDK_VARIANT="normal"
16626  else
16627    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16628  fi
16629
16630
16631
16632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16633$as_echo "$JDK_VARIANT" >&6; }
16634
16635
16636  DEBUG_LEVEL="release"
16637  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16638$as_echo_n "checking which debug level to use... " >&6; }
16639  # Check whether --enable-debug was given.
16640if test "${enable_debug+set}" = set; then :
16641  enableval=$enable_debug;
16642        ENABLE_DEBUG="${enableval}"
16643        DEBUG_LEVEL="fastdebug"
16644
16645else
16646  ENABLE_DEBUG="no"
16647fi
16648
16649
16650
16651# Check whether --with-debug-level was given.
16652if test "${with_debug_level+set}" = set; then :
16653  withval=$with_debug_level;
16654        DEBUG_LEVEL="${withval}"
16655        if test "x$ENABLE_DEBUG" = xyes; then
16656          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16657        fi
16658
16659fi
16660
16661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16662$as_echo "$DEBUG_LEVEL" >&6; }
16663
16664  if test "x$DEBUG_LEVEL" != xrelease && \
16665      test "x$DEBUG_LEVEL" != xoptimized && \
16666      test "x$DEBUG_LEVEL" != xfastdebug && \
16667      test "x$DEBUG_LEVEL" != xslowdebug; then
16668    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16669  fi
16670
16671  # Translate DEBUG_LEVEL to debug level used by Hotspot
16672  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16673  if test "x$DEBUG_LEVEL" = xrelease; then
16674    HOTSPOT_DEBUG_LEVEL="product"
16675  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16676    HOTSPOT_DEBUG_LEVEL="debug"
16677  fi
16678
16679  if test "x$DEBUG_LEVEL" = xoptimized; then
16680    # The debug level 'optimized' is a little special because it is currently only
16681    # applicable to the HotSpot build where it means to build a completely
16682    # optimized version of the VM without any debugging code (like for the
16683    # 'release' debug level which is called 'product' in the HotSpot build) but
16684    # with the exception that it can contain additional code which is otherwise
16685    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16686    # test new and/or experimental features which are not intended for customer
16687    # shipment. Because these new features need to be tested and benchmarked in
16688    # real world scenarios, we want to build the containing JDK at the 'release'
16689    # debug level.
16690    DEBUG_LEVEL="release"
16691  fi
16692
16693
16694
16695
16696
16697
16698# Check whether --with-jvm-variants was given.
16699if test "${with_jvm_variants+set}" = set; then :
16700  withval=$with_jvm_variants;
16701fi
16702
16703
16704  if test "x$with_jvm_variants" = x; then
16705    with_jvm_variants="server"
16706  fi
16707  JVM_VARIANTS_OPT="$with_jvm_variants"
16708
16709  # Has the user listed more than one variant?
16710  # Additional [] needed to keep m4 from mangling shell constructs.
16711  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16712    BUILDING_MULTIPLE_JVM_VARIANTS=true
16713  else
16714    BUILDING_MULTIPLE_JVM_VARIANTS=false
16715  fi
16716  # Replace the commas with AND for use in the build directory name.
16717  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16718
16719  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16720$as_echo_n "checking which variants of the JVM to build... " >&6; }
16721  # JVM_VARIANTS is a space-separated list.
16722  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16723  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16725$as_echo "$JVM_VARIANTS" >&6; }
16726
16727  # Check that the selected variants are valid
16728
16729  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16730  # Notice that the original variant failes on SLES 10 and 11
16731  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16732  STACK=${JVM_VARIANTS// /$'\n'}
16733  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16734  if test "x$INVALID_VARIANTS" != x; then
16735    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16736$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16737    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16738  fi
16739
16740  # All "special" variants share the same output directory ("server")
16741  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16742  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16743  STACK=${JVM_VARIANTS// /$'\n'}
16744  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16745  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16746    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16747  fi
16748
16749
16750
16751
16752  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16753    # zero behaves as a platform and rewrites these values. This is really weird. :(
16754    # We are guaranteed that we do not build any other variants when building zero.
16755    HOTSPOT_TARGET_CPU=zero
16756    HOTSPOT_TARGET_CPU_ARCH=zero
16757  fi
16758
16759
16760# With basic setup done, call the custom early hook.
16761
16762
16763# Check if we have devkits, extra paths or sysroot set.
16764
16765
16766# Check whether --with-devkit was given.
16767if test "${with_devkit+set}" = set; then :
16768  withval=$with_devkit;
16769
16770  # Only process if variable expands to non-empty
16771
16772  if test "x$with_devkit" != x; then
16773    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16774
16775  # Input might be given as Windows format, start by converting to
16776  # unix format.
16777  path="$with_devkit"
16778  new_path=`$CYGPATH -u "$path"`
16779
16780  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16781  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16782  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16783  # "foo.exe" is OK but "foo" is an error.
16784  #
16785  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16786  # It is also a way to make sure we got the proper file name for the real test later on.
16787  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16788  if test "x$test_shortpath" = x; then
16789    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16790$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16791    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16792  fi
16793
16794  # Call helper function which possibly converts this using DOS-style short mode.
16795  # If so, the updated path is stored in $new_path.
16796
16797  input_path="$new_path"
16798  # Check if we need to convert this using DOS-style short mode. If the path
16799  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16800  # take no chances and rewrite it.
16801  # Note: m4 eats our [], so we need to use [ and ] instead.
16802  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16803  if test "x$has_forbidden_chars" != x; then
16804    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16805    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16806    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16807    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16808      # Going to short mode and back again did indeed matter. Since short mode is
16809      # case insensitive, let's make it lowercase to improve readability.
16810      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16811      # Now convert it back to Unix-style (cygpath)
16812      input_path=`$CYGPATH -u "$shortmode_path"`
16813      new_path="$input_path"
16814    fi
16815  fi
16816
16817  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16818  if test "x$test_cygdrive_prefix" = x; then
16819    # As a simple fix, exclude /usr/bin since it's not a real path.
16820    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16821      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16822      # a path prefixed by /cygdrive for fixpath to work.
16823      new_path="$CYGWIN_ROOT_PATH$input_path"
16824    fi
16825  fi
16826
16827
16828  if test "x$path" != "x$new_path"; then
16829    with_devkit="$new_path"
16830    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16831$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16832  fi
16833
16834    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16835
16836  path="$with_devkit"
16837  has_colon=`$ECHO $path | $GREP ^.:`
16838  new_path="$path"
16839  if test "x$has_colon" = x; then
16840    # Not in mixed or Windows style, start by that.
16841    new_path=`cmd //c echo $path`
16842  fi
16843
16844
16845  input_path="$new_path"
16846  # Check if we need to convert this using DOS-style short mode. If the path
16847  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16848  # take no chances and rewrite it.
16849  # Note: m4 eats our [], so we need to use [ and ] instead.
16850  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16851  if test "x$has_forbidden_chars" != x; then
16852    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16853    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16854  fi
16855
16856
16857  windows_path="$new_path"
16858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16859    unix_path=`$CYGPATH -u "$windows_path"`
16860    new_path="$unix_path"
16861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16863    new_path="$unix_path"
16864  fi
16865
16866  if test "x$path" != "x$new_path"; then
16867    with_devkit="$new_path"
16868    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16869$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16870  fi
16871
16872  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16873  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16874
16875    else
16876      # We're on a unix platform. Hooray! :)
16877      path="$with_devkit"
16878      has_space=`$ECHO "$path" | $GREP " "`
16879      if test "x$has_space" != x; then
16880        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16881$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16882        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16883      fi
16884
16885      # Use eval to expand a potential ~
16886      eval path="$path"
16887      if test ! -f "$path" && test ! -d "$path"; then
16888        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16889      fi
16890
16891      if test -d "$path"; then
16892        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16893      else
16894        dir="`$DIRNAME "$path"`"
16895        base="`$BASENAME "$path"`"
16896        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16897      fi
16898    fi
16899  fi
16900
16901        DEVKIT_ROOT="$with_devkit"
16902        # Check for a meta data info file in the root of the devkit
16903        if test -f "$DEVKIT_ROOT/devkit.info"; then
16904          . $DEVKIT_ROOT/devkit.info
16905          # This potentially sets the following:
16906          # A descriptive name of the devkit
16907
16908  if test "x$DEVKIT_NAME" = x; then
16909    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16910  fi
16911
16912          # Corresponds to --with-extra-path
16913
16914  if test "x$DEVKIT_EXTRA_PATH" = x; then
16915    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16916  fi
16917
16918          # Corresponds to --with-toolchain-path
16919
16920  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16921    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16922  fi
16923
16924          # Corresponds to --with-sysroot
16925
16926  if test "x$DEVKIT_SYSROOT" = x; then
16927    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16928  fi
16929
16930
16931          # Identifies the Visual Studio version in the devkit
16932
16933  if test "x$DEVKIT_VS_VERSION" = x; then
16934    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16935  fi
16936
16937          # The Visual Studio include environment variable
16938
16939  if test "x$DEVKIT_VS_INCLUDE" = x; then
16940    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16941  fi
16942
16943          # The Visual Studio lib environment variable
16944
16945  if test "x$DEVKIT_VS_LIB" = x; then
16946    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16947  fi
16948
16949          # Corresponds to --with-msvcr-dll
16950
16951  if test "x$DEVKIT_MSVCR_DLL" = x; then
16952    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16953  fi
16954
16955          # Corresponds to --with-msvcp-dll
16956
16957  if test "x$DEVKIT_MSVCP_DLL" = x; then
16958    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16959  fi
16960
16961        fi
16962
16963        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16964$as_echo_n "checking for devkit... " >&6; }
16965        if test "x$DEVKIT_NAME" != x; then
16966          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16967$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16968        else
16969          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16970$as_echo "$DEVKIT_ROOT" >&6; }
16971        fi
16972
16973
16974  if test "x$DEVKIT_EXTRA_PATH" != x; then
16975    if test "x$EXTRA_PATH" = x; then
16976      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16977    else
16978      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16979    fi
16980  fi
16981
16982
16983        # Fallback default of just /bin if DEVKIT_PATH is not defined
16984        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16985          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16986        fi
16987
16988  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16989    if test "x$TOOLCHAIN_PATH" = x; then
16990      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16991    else
16992      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16993    fi
16994  fi
16995
16996
16997        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16998        # places for backwards compatiblity.
16999        if test "x$DEVKIT_SYSROOT" != x; then
17000          SYSROOT="$DEVKIT_SYSROOT"
17001        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17002          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17003        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17004          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17005        fi
17006
17007
17008fi
17009
17010
17011  # You can force the sysroot if the sysroot encoded into the compiler tools
17012  # is not correct.
17013
17014# Check whether --with-sys-root was given.
17015if test "${with_sys_root+set}" = set; then :
17016  withval=$with_sys_root; SYSROOT=$with_sys_root
17017
17018fi
17019
17020
17021
17022# Check whether --with-sysroot was given.
17023if test "${with_sysroot+set}" = set; then :
17024  withval=$with_sysroot; SYSROOT=$with_sysroot
17025
17026fi
17027
17028
17029
17030# Check whether --with-tools-dir was given.
17031if test "${with_tools_dir+set}" = set; then :
17032  withval=$with_tools_dir;
17033  if test "x$with_tools_dir" != x; then
17034    if test "x$TOOLCHAIN_PATH" = x; then
17035      TOOLCHAIN_PATH="$with_tools_dir"
17036    else
17037      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17038    fi
17039  fi
17040
17041
17042fi
17043
17044
17045
17046# Check whether --with-toolchain-path was given.
17047if test "${with_toolchain_path+set}" = set; then :
17048  withval=$with_toolchain_path;
17049  if test "x$with_toolchain_path" != x; then
17050    if test "x$TOOLCHAIN_PATH" = x; then
17051      TOOLCHAIN_PATH="$with_toolchain_path"
17052    else
17053      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17054    fi
17055  fi
17056
17057
17058fi
17059
17060
17061
17062# Check whether --with-extra-path was given.
17063if test "${with_extra_path+set}" = set; then :
17064  withval=$with_extra_path;
17065  if test "x$with_extra_path" != x; then
17066    if test "x$EXTRA_PATH" = x; then
17067      EXTRA_PATH="$with_extra_path"
17068    else
17069      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17070    fi
17071  fi
17072
17073
17074fi
17075
17076
17077  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17078    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17079    # If not, detect if Xcode is installed by running xcodebuild -version
17080    # if no Xcode installed, xcodebuild exits with 1
17081    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17082    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17083      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17084      # fall back on the stub binary in /usr/bin/xcodebuild
17085      # Extract the first word of "xcodebuild", so it can be a program name with args.
17086set dummy xcodebuild; ac_word=$2
17087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17088$as_echo_n "checking for $ac_word... " >&6; }
17089if ${ac_cv_path_XCODEBUILD+:} false; then :
17090  $as_echo_n "(cached) " >&6
17091else
17092  case $XCODEBUILD in
17093  [\\/]* | ?:[\\/]*)
17094  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17095  ;;
17096  *)
17097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17098for as_dir in $TOOLCHAIN_PATH
17099do
17100  IFS=$as_save_IFS
17101  test -z "$as_dir" && as_dir=.
17102    for ac_exec_ext in '' $ac_executable_extensions; do
17103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17104    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17106    break 2
17107  fi
17108done
17109  done
17110IFS=$as_save_IFS
17111
17112  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17113  ;;
17114esac
17115fi
17116XCODEBUILD=$ac_cv_path_XCODEBUILD
17117if test -n "$XCODEBUILD"; then
17118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17119$as_echo "$XCODEBUILD" >&6; }
17120else
17121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17122$as_echo "no" >&6; }
17123fi
17124
17125
17126    else
17127      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17128      # when only the command line tools are installed there are no SDKs, so headers
17129      # are copied into the system frameworks
17130      XCODEBUILD=
17131
17132    fi
17133
17134    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17135$as_echo_n "checking for sdk name... " >&6; }
17136
17137# Check whether --with-sdk-name was given.
17138if test "${with_sdk_name+set}" = set; then :
17139  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17140
17141fi
17142
17143    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17144$as_echo "$SDKNAME" >&6; }
17145
17146    # if toolchain path is specified then don't rely on system headers, they may not compile
17147    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17148    test -z "$TOOLCHAIN_PATH" && \
17149      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17150
17151    if test -z "$SYSROOT"; then
17152      if test -n "$XCODEBUILD"; then
17153        # if we don't have system headers, use default SDK name (last resort)
17154        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17155          SDKNAME=${SDKNAME:-macosx}
17156        fi
17157
17158        if test -n "$SDKNAME"; then
17159          # Call xcodebuild to determine SYSROOT
17160          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17161        fi
17162      else
17163        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17164          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
17165        fi
17166      fi
17167    else
17168      # warn user if --with-sdk-name was also set
17169      if test -n "$with_sdk_name"; then
17170        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17171$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17172      fi
17173    fi
17174
17175    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17176      # If no system framework headers, then SYSROOT must be set, or we won't build
17177      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
17178    fi
17179
17180    # Perform a basic sanity test
17181    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17182      if test -z "$SYSROOT"; then
17183        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
17184      else
17185        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17186      fi
17187    fi
17188
17189    # set SDKROOT too, Xcode tools will pick it up
17190    SDKROOT=$SYSROOT
17191
17192  fi
17193
17194  # Prepend the extra path to the global path
17195
17196  if test "x$EXTRA_PATH" != x; then
17197    if test "x$PATH" = x; then
17198      PATH="$EXTRA_PATH"
17199    else
17200      PATH="$EXTRA_PATH:$PATH"
17201    fi
17202  fi
17203
17204
17205  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17206$as_echo_n "checking for sysroot... " >&6; }
17207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17208$as_echo "$SYSROOT" >&6; }
17209  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17210$as_echo_n "checking for toolchain path... " >&6; }
17211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17212$as_echo "$TOOLCHAIN_PATH" >&6; }
17213  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17214$as_echo_n "checking for extra path... " >&6; }
17215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17216$as_echo "$EXTRA_PATH" >&6; }
17217
17218
17219# To properly create a configuration name, we need to have the OpenJDK target
17220# and options (variants and debug level) parsed.
17221
17222
17223
17224# Check whether --with-conf-name was given.
17225if test "${with_conf_name+set}" = set; then :
17226  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17227fi
17228
17229
17230  # Test from where we are running configure, in or outside of src root.
17231  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17232$as_echo_n "checking where to store configuration... " >&6; }
17233  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17234      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17235      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17236    # We are running configure from the src root.
17237    # Create a default ./build/target-variant-debuglevel output root.
17238    if test "x${CONF_NAME}" = x; then
17239      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17240$as_echo "in default location" >&6; }
17241      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17242    else
17243      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17244$as_echo "in build directory with custom name" >&6; }
17245    fi
17246    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17247    $MKDIR -p "$OUTPUT_ROOT"
17248    if test ! -d "$OUTPUT_ROOT"; then
17249      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17250    fi
17251  else
17252    # We are running configure from outside of the src dir.
17253    # Then use the current directory as output dir!
17254    # If configuration is situated in normal build directory, just use the build
17255    # directory name as configuration name, otherwise use the complete path.
17256    if test "x${CONF_NAME}" = x; then
17257      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17258    fi
17259    OUTPUT_ROOT="$CURDIR"
17260    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17261$as_echo "in current directory" >&6; }
17262
17263    # WARNING: This might be a bad thing to do. You need to be sure you want to
17264    # have a configuration in this directory. Do some sanity checks!
17265
17266    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17267      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17268      # other files
17269      files_present=`$LS $OUTPUT_ROOT`
17270      # Configure has already touched config.log and confdefs.h in the current dir when this check
17271      # is performed.
17272      filtered_files=`$ECHO "$files_present" \
17273          | $SED -e 's/config.log//g' \
17274              -e 's/configure.log//g' \
17275              -e 's/confdefs.h//g' \
17276              -e 's/ //g' \
17277          | $TR -d '\n'`
17278      if test "x$filtered_files" != x; then
17279        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17280$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17281        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17282$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17283        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17284$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17285        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17286$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17287        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17288$as_echo "$as_me: seriously mess up just about everything." >&6;}
17289        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17290$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17291        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17292$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17293        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17294      fi
17295    fi
17296  fi
17297  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17298$as_echo_n "checking what configuration name to use... " >&6; }
17299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17300$as_echo "$CONF_NAME" >&6; }
17301
17302
17303  # Only process if variable expands to non-empty
17304
17305  if test "x$OUTPUT_ROOT" != x; then
17306    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17307
17308  # Input might be given as Windows format, start by converting to
17309  # unix format.
17310  path="$OUTPUT_ROOT"
17311  new_path=`$CYGPATH -u "$path"`
17312
17313  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17314  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17315  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17316  # "foo.exe" is OK but "foo" is an error.
17317  #
17318  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17319  # It is also a way to make sure we got the proper file name for the real test later on.
17320  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17321  if test "x$test_shortpath" = x; then
17322    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17323$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17324    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17325  fi
17326
17327  # Call helper function which possibly converts this using DOS-style short mode.
17328  # If so, the updated path is stored in $new_path.
17329
17330  input_path="$new_path"
17331  # Check if we need to convert this using DOS-style short mode. If the path
17332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17333  # take no chances and rewrite it.
17334  # Note: m4 eats our [], so we need to use [ and ] instead.
17335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17336  if test "x$has_forbidden_chars" != x; then
17337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17338    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17339    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17340    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17341      # Going to short mode and back again did indeed matter. Since short mode is
17342      # case insensitive, let's make it lowercase to improve readability.
17343      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17344      # Now convert it back to Unix-style (cygpath)
17345      input_path=`$CYGPATH -u "$shortmode_path"`
17346      new_path="$input_path"
17347    fi
17348  fi
17349
17350  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17351  if test "x$test_cygdrive_prefix" = x; then
17352    # As a simple fix, exclude /usr/bin since it's not a real path.
17353    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17354      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17355      # a path prefixed by /cygdrive for fixpath to work.
17356      new_path="$CYGWIN_ROOT_PATH$input_path"
17357    fi
17358  fi
17359
17360
17361  if test "x$path" != "x$new_path"; then
17362    OUTPUT_ROOT="$new_path"
17363    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17364$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17365  fi
17366
17367    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17368
17369  path="$OUTPUT_ROOT"
17370  has_colon=`$ECHO $path | $GREP ^.:`
17371  new_path="$path"
17372  if test "x$has_colon" = x; then
17373    # Not in mixed or Windows style, start by that.
17374    new_path=`cmd //c echo $path`
17375  fi
17376
17377
17378  input_path="$new_path"
17379  # Check if we need to convert this using DOS-style short mode. If the path
17380  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17381  # take no chances and rewrite it.
17382  # Note: m4 eats our [], so we need to use [ and ] instead.
17383  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17384  if test "x$has_forbidden_chars" != x; then
17385    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17386    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17387  fi
17388
17389
17390  windows_path="$new_path"
17391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17392    unix_path=`$CYGPATH -u "$windows_path"`
17393    new_path="$unix_path"
17394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17396    new_path="$unix_path"
17397  fi
17398
17399  if test "x$path" != "x$new_path"; then
17400    OUTPUT_ROOT="$new_path"
17401    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17402$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17403  fi
17404
17405  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17406  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17407
17408    else
17409      # We're on a unix platform. Hooray! :)
17410      path="$OUTPUT_ROOT"
17411      has_space=`$ECHO "$path" | $GREP " "`
17412      if test "x$has_space" != x; then
17413        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17414$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17415        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17416      fi
17417
17418      # Use eval to expand a potential ~
17419      eval path="$path"
17420      if test ! -f "$path" && test ! -d "$path"; then
17421        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17422      fi
17423
17424      if test -d "$path"; then
17425        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17426      else
17427        dir="`$DIRNAME "$path"`"
17428        base="`$BASENAME "$path"`"
17429        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17430      fi
17431    fi
17432  fi
17433
17434
17435  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17436  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17437
17438  SPEC=$OUTPUT_ROOT/spec.gmk
17439
17440  CONF_NAME=$CONF_NAME
17441
17442  OUTPUT_ROOT=$OUTPUT_ROOT
17443
17444
17445
17446  # The spec.gmk file contains all variables for the make system.
17447  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17448
17449  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17450  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17451
17452  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17453  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17454
17455  # The compare.sh is used to compare the build output to other builds.
17456  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17457
17458  # The generated Makefile knows where the spec.gmk is and where the source is.
17459  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17460  # which will look for generated configurations
17461  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17462
17463
17464
17465# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17466
17467  for ac_prog in apt-get yum port pkgutil pkgadd
17468do
17469  # Extract the first word of "$ac_prog", so it can be a program name with args.
17470set dummy $ac_prog; ac_word=$2
17471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17472$as_echo_n "checking for $ac_word... " >&6; }
17473if ${ac_cv_prog_PKGHANDLER+:} false; then :
17474  $as_echo_n "(cached) " >&6
17475else
17476  if test -n "$PKGHANDLER"; then
17477  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17478else
17479as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17480for as_dir in $PATH
17481do
17482  IFS=$as_save_IFS
17483  test -z "$as_dir" && as_dir=.
17484    for ac_exec_ext in '' $ac_executable_extensions; do
17485  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17486    ac_cv_prog_PKGHANDLER="$ac_prog"
17487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17488    break 2
17489  fi
17490done
17491  done
17492IFS=$as_save_IFS
17493
17494fi
17495fi
17496PKGHANDLER=$ac_cv_prog_PKGHANDLER
17497if test -n "$PKGHANDLER"; then
17498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17499$as_echo "$PKGHANDLER" >&6; }
17500else
17501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17502$as_echo "no" >&6; }
17503fi
17504
17505
17506  test -n "$PKGHANDLER" && break
17507done
17508
17509
17510
17511# Setup tools that requires more complex handling, or that is not needed by the configure script.
17512
17513
17514
17515  # Publish this variable in the help.
17516
17517
17518  if [ -z "${MAKE+x}" ]; then
17519    # The variable is not set by user, try to locate tool using the code snippet
17520
17521    # Try our hardest to locate a correct version of GNU make
17522    for ac_prog in gmake
17523do
17524  # Extract the first word of "$ac_prog", so it can be a program name with args.
17525set dummy $ac_prog; ac_word=$2
17526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17527$as_echo_n "checking for $ac_word... " >&6; }
17528if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17529  $as_echo_n "(cached) " >&6
17530else
17531  case $CHECK_GMAKE in
17532  [\\/]* | ?:[\\/]*)
17533  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17534  ;;
17535  *)
17536  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17537for as_dir in $PATH
17538do
17539  IFS=$as_save_IFS
17540  test -z "$as_dir" && as_dir=.
17541    for ac_exec_ext in '' $ac_executable_extensions; do
17542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17543    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17545    break 2
17546  fi
17547done
17548  done
17549IFS=$as_save_IFS
17550
17551  ;;
17552esac
17553fi
17554CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17555if test -n "$CHECK_GMAKE"; then
17556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17557$as_echo "$CHECK_GMAKE" >&6; }
17558else
17559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17560$as_echo "no" >&6; }
17561fi
17562
17563
17564  test -n "$CHECK_GMAKE" && break
17565done
17566
17567
17568  MAKE_CANDIDATE=""$CHECK_GMAKE""
17569  DESCRIPTION="gmake in PATH"
17570
17571  # On Cygwin, we require a newer version of make than on other platforms
17572  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17573    MAKE_VERSION_EXPR="-e 4\."
17574    MAKE_REQUIRED_VERSION="4.0"
17575   else
17576    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17577    MAKE_REQUIRED_VERSION="3.81"
17578  fi
17579
17580  if test "x$MAKE_CANDIDATE" != x; then
17581    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17582$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17583    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17584    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17585    if test "x$IS_GNU_MAKE" = x; then
17586      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17587$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17588    else
17589      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17590      if test "x$IS_MODERN_MAKE" = x; then
17591        { $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
17592$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;}
17593      else
17594        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17595          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17596            MAKE_EXPECTED_ENV='cygwin'
17597          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17598            MAKE_EXPECTED_ENV='msys'
17599          else
17600            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17601          fi
17602          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17603          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17604        else
17605          # Not relevant for non-Windows
17606          IS_MAKE_CORRECT_ENV=true
17607        fi
17608        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17609          { $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
17610$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;}
17611        else
17612          FOUND_MAKE=$MAKE_CANDIDATE
17613
17614  # Only process if variable expands to non-empty
17615
17616  if test "x$FOUND_MAKE" != x; then
17617    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17618
17619  # First separate the path from the arguments. This will split at the first
17620  # space.
17621  complete="$FOUND_MAKE"
17622  path="${complete%% *}"
17623  tmp="$complete EOL"
17624  arguments="${tmp#* }"
17625
17626  # Input might be given as Windows format, start by converting to
17627  # unix format.
17628  new_path=`$CYGPATH -u "$path"`
17629
17630  # Now try to locate executable using which
17631  new_path=`$WHICH "$new_path" 2> /dev/null`
17632  # bat and cmd files are not always considered executable in cygwin causing which
17633  # to not find them
17634  if test "x$new_path" = x \
17635      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17636      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17637    new_path=`$CYGPATH -u "$path"`
17638  fi
17639  if test "x$new_path" = x; then
17640    # Oops. Which didn't find the executable.
17641    # The splitting of arguments from the executable at a space might have been incorrect,
17642    # since paths with space are more likely in Windows. Give it another try with the whole
17643    # argument.
17644    path="$complete"
17645    arguments="EOL"
17646    new_path=`$CYGPATH -u "$path"`
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      # It's still not found. Now this is an unrecoverable error.
17657      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17658$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17659      has_space=`$ECHO "$complete" | $GREP " "`
17660      if test "x$has_space" != x; then
17661        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17662$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17663      fi
17664      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17665    fi
17666  fi
17667
17668  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17669  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17670  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17671  # "foo.exe" is OK but "foo" is an error.
17672  #
17673  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17674  # It is also a way to make sure we got the proper file name for the real test later on.
17675  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17676  if test "x$test_shortpath" = x; then
17677    # Short path failed, file does not exist as specified.
17678    # Try adding .exe or .cmd
17679    if test -f "${new_path}.exe"; then
17680      input_to_shortpath="${new_path}.exe"
17681    elif test -f "${new_path}.cmd"; then
17682      input_to_shortpath="${new_path}.cmd"
17683    else
17684      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17685$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17686      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17687$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17688      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17689    fi
17690  else
17691    input_to_shortpath="$new_path"
17692  fi
17693
17694  # Call helper function which possibly converts this using DOS-style short mode.
17695  # If so, the updated path is stored in $new_path.
17696  new_path="$input_to_shortpath"
17697
17698  input_path="$input_to_shortpath"
17699  # Check if we need to convert this using DOS-style short mode. If the path
17700  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17701  # take no chances and rewrite it.
17702  # Note: m4 eats our [], so we need to use [ and ] instead.
17703  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17704  if test "x$has_forbidden_chars" != x; then
17705    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17706    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17707    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17708    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17709      # Going to short mode and back again did indeed matter. Since short mode is
17710      # case insensitive, let's make it lowercase to improve readability.
17711      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17712      # Now convert it back to Unix-style (cygpath)
17713      input_path=`$CYGPATH -u "$shortmode_path"`
17714      new_path="$input_path"
17715    fi
17716  fi
17717
17718  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17719  if test "x$test_cygdrive_prefix" = x; then
17720    # As a simple fix, exclude /usr/bin since it's not a real path.
17721    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17722      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17723      # a path prefixed by /cygdrive for fixpath to work.
17724      new_path="$CYGWIN_ROOT_PATH$input_path"
17725    fi
17726  fi
17727
17728  # remove trailing .exe if any
17729  new_path="${new_path/%.exe/}"
17730
17731    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17732
17733  # First separate the path from the arguments. This will split at the first
17734  # space.
17735  complete="$FOUND_MAKE"
17736  path="${complete%% *}"
17737  tmp="$complete EOL"
17738  arguments="${tmp#* }"
17739
17740  # Input might be given as Windows format, start by converting to
17741  # unix format.
17742  new_path="$path"
17743
17744  windows_path="$new_path"
17745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17746    unix_path=`$CYGPATH -u "$windows_path"`
17747    new_path="$unix_path"
17748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17750    new_path="$unix_path"
17751  fi
17752
17753
17754  # Now try to locate executable using which
17755  new_path=`$WHICH "$new_path" 2> /dev/null`
17756
17757  if test "x$new_path" = x; then
17758    # Oops. Which didn't find the executable.
17759    # The splitting of arguments from the executable at a space might have been incorrect,
17760    # since paths with space are more likely in Windows. Give it another try with the whole
17761    # argument.
17762    path="$complete"
17763    arguments="EOL"
17764    new_path="$path"
17765
17766  windows_path="$new_path"
17767  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17768    unix_path=`$CYGPATH -u "$windows_path"`
17769    new_path="$unix_path"
17770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17771    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17772    new_path="$unix_path"
17773  fi
17774
17775
17776    new_path=`$WHICH "$new_path" 2> /dev/null`
17777    # bat and cmd files are not always considered executable in MSYS causing which
17778    # to not find them
17779    if test "x$new_path" = x \
17780        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17781        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17782      new_path="$path"
17783
17784  windows_path="$new_path"
17785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17786    unix_path=`$CYGPATH -u "$windows_path"`
17787    new_path="$unix_path"
17788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17789    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17790    new_path="$unix_path"
17791  fi
17792
17793    fi
17794
17795    if test "x$new_path" = x; then
17796      # It's still not found. Now this is an unrecoverable error.
17797      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17798$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17799      has_space=`$ECHO "$complete" | $GREP " "`
17800      if test "x$has_space" != x; then
17801        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17802$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17803      fi
17804      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17805    fi
17806  fi
17807
17808  # Now new_path has a complete unix path to the binary
17809  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17810    # Keep paths in /bin as-is, but remove trailing .exe if any
17811    new_path="${new_path/%.exe/}"
17812    # Do not save /bin paths to all_fixpath_prefixes!
17813  else
17814    # Not in mixed or Windows style, start by that.
17815    new_path=`cmd //c echo $new_path`
17816
17817  input_path="$new_path"
17818  # Check if we need to convert this using DOS-style short mode. If the path
17819  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17820  # take no chances and rewrite it.
17821  # Note: m4 eats our [], so we need to use [ and ] instead.
17822  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17823  if test "x$has_forbidden_chars" != x; then
17824    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17825    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17826  fi
17827
17828    # Output is in $new_path
17829
17830  windows_path="$new_path"
17831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17832    unix_path=`$CYGPATH -u "$windows_path"`
17833    new_path="$unix_path"
17834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17836    new_path="$unix_path"
17837  fi
17838
17839    # remove trailing .exe if any
17840    new_path="${new_path/%.exe/}"
17841
17842    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17843    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17844  fi
17845
17846    else
17847      # We're on a unix platform. Hooray! :)
17848      # First separate the path from the arguments. This will split at the first
17849      # space.
17850      complete="$FOUND_MAKE"
17851      path="${complete%% *}"
17852      tmp="$complete EOL"
17853      arguments="${tmp#* }"
17854
17855      # Cannot rely on the command "which" here since it doesn't always work.
17856      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17857      if test -z "$is_absolute_path"; then
17858        # Path to executable is not absolute. Find it.
17859        IFS_save="$IFS"
17860        IFS=:
17861        for p in $PATH; do
17862          if test -f "$p/$path" && test -x "$p/$path"; then
17863            new_path="$p/$path"
17864            break
17865          fi
17866        done
17867        IFS="$IFS_save"
17868      else
17869        # This is an absolute path, we can use it without further modifications.
17870        new_path="$path"
17871      fi
17872
17873      if test "x$new_path" = x; then
17874        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17875$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17876        has_space=`$ECHO "$complete" | $GREP " "`
17877        if test "x$has_space" != x; then
17878          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17879$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17880        fi
17881        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17882      fi
17883    fi
17884
17885    # Now join together the path and the arguments once again
17886    if test "x$arguments" != xEOL; then
17887      new_complete="$new_path ${arguments% *}"
17888    else
17889      new_complete="$new_path"
17890    fi
17891
17892    if test "x$complete" != "x$new_complete"; then
17893      FOUND_MAKE="$new_complete"
17894      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17895$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17896    fi
17897  fi
17898
17899        fi
17900      fi
17901    fi
17902  fi
17903
17904
17905    if test "x$FOUND_MAKE" = x; then
17906      for ac_prog in make
17907do
17908  # Extract the first word of "$ac_prog", so it can be a program name with args.
17909set dummy $ac_prog; ac_word=$2
17910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17911$as_echo_n "checking for $ac_word... " >&6; }
17912if ${ac_cv_path_CHECK_MAKE+:} false; then :
17913  $as_echo_n "(cached) " >&6
17914else
17915  case $CHECK_MAKE in
17916  [\\/]* | ?:[\\/]*)
17917  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17918  ;;
17919  *)
17920  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17921for as_dir in $PATH
17922do
17923  IFS=$as_save_IFS
17924  test -z "$as_dir" && as_dir=.
17925    for ac_exec_ext in '' $ac_executable_extensions; do
17926  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17927    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17929    break 2
17930  fi
17931done
17932  done
17933IFS=$as_save_IFS
17934
17935  ;;
17936esac
17937fi
17938CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17939if test -n "$CHECK_MAKE"; then
17940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17941$as_echo "$CHECK_MAKE" >&6; }
17942else
17943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17944$as_echo "no" >&6; }
17945fi
17946
17947
17948  test -n "$CHECK_MAKE" && break
17949done
17950
17951
17952  MAKE_CANDIDATE=""$CHECK_MAKE""
17953  DESCRIPTION="make in PATH"
17954
17955  # On Cygwin, we require a newer version of make than on other platforms
17956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17957    MAKE_VERSION_EXPR="-e 4\."
17958    MAKE_REQUIRED_VERSION="4.0"
17959   else
17960    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17961    MAKE_REQUIRED_VERSION="3.81"
17962  fi
17963
17964  if test "x$MAKE_CANDIDATE" != x; then
17965    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17966$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17967    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17968    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17969    if test "x$IS_GNU_MAKE" = x; then
17970      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17971$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17972    else
17973      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17974      if test "x$IS_MODERN_MAKE" = x; then
17975        { $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
17976$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;}
17977      else
17978        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17979          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17980            MAKE_EXPECTED_ENV='cygwin'
17981          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17982            MAKE_EXPECTED_ENV='msys'
17983          else
17984            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17985          fi
17986          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17987          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17988        else
17989          # Not relevant for non-Windows
17990          IS_MAKE_CORRECT_ENV=true
17991        fi
17992        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17993          { $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
17994$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;}
17995        else
17996          FOUND_MAKE=$MAKE_CANDIDATE
17997
17998  # Only process if variable expands to non-empty
17999
18000  if test "x$FOUND_MAKE" != x; then
18001    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18002
18003  # First separate the path from the arguments. This will split at the first
18004  # space.
18005  complete="$FOUND_MAKE"
18006  path="${complete%% *}"
18007  tmp="$complete EOL"
18008  arguments="${tmp#* }"
18009
18010  # Input might be given as Windows format, start by converting to
18011  # unix format.
18012  new_path=`$CYGPATH -u "$path"`
18013
18014  # Now try to locate executable using which
18015  new_path=`$WHICH "$new_path" 2> /dev/null`
18016  # bat and cmd files are not always considered executable in cygwin causing which
18017  # to not find them
18018  if test "x$new_path" = x \
18019      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18020      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18021    new_path=`$CYGPATH -u "$path"`
18022  fi
18023  if test "x$new_path" = x; then
18024    # Oops. Which didn't find the executable.
18025    # The splitting of arguments from the executable at a space might have been incorrect,
18026    # since paths with space are more likely in Windows. Give it another try with the whole
18027    # argument.
18028    path="$complete"
18029    arguments="EOL"
18030    new_path=`$CYGPATH -u "$path"`
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      # It's still not found. Now this is an unrecoverable error.
18041      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18042$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18043      has_space=`$ECHO "$complete" | $GREP " "`
18044      if test "x$has_space" != x; then
18045        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18046$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18047      fi
18048      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18049    fi
18050  fi
18051
18052  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18053  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18054  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18055  # "foo.exe" is OK but "foo" is an error.
18056  #
18057  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18058  # It is also a way to make sure we got the proper file name for the real test later on.
18059  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18060  if test "x$test_shortpath" = x; then
18061    # Short path failed, file does not exist as specified.
18062    # Try adding .exe or .cmd
18063    if test -f "${new_path}.exe"; then
18064      input_to_shortpath="${new_path}.exe"
18065    elif test -f "${new_path}.cmd"; then
18066      input_to_shortpath="${new_path}.cmd"
18067    else
18068      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18069$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18070      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18071$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18072      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18073    fi
18074  else
18075    input_to_shortpath="$new_path"
18076  fi
18077
18078  # Call helper function which possibly converts this using DOS-style short mode.
18079  # If so, the updated path is stored in $new_path.
18080  new_path="$input_to_shortpath"
18081
18082  input_path="$input_to_shortpath"
18083  # Check if we need to convert this using DOS-style short mode. If the path
18084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18085  # take no chances and rewrite it.
18086  # Note: m4 eats our [], so we need to use [ and ] instead.
18087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18088  if test "x$has_forbidden_chars" != x; then
18089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18090    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18091    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18092    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18093      # Going to short mode and back again did indeed matter. Since short mode is
18094      # case insensitive, let's make it lowercase to improve readability.
18095      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18096      # Now convert it back to Unix-style (cygpath)
18097      input_path=`$CYGPATH -u "$shortmode_path"`
18098      new_path="$input_path"
18099    fi
18100  fi
18101
18102  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18103  if test "x$test_cygdrive_prefix" = x; then
18104    # As a simple fix, exclude /usr/bin since it's not a real path.
18105    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18106      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18107      # a path prefixed by /cygdrive for fixpath to work.
18108      new_path="$CYGWIN_ROOT_PATH$input_path"
18109    fi
18110  fi
18111
18112  # remove trailing .exe if any
18113  new_path="${new_path/%.exe/}"
18114
18115    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18116
18117  # First separate the path from the arguments. This will split at the first
18118  # space.
18119  complete="$FOUND_MAKE"
18120  path="${complete%% *}"
18121  tmp="$complete EOL"
18122  arguments="${tmp#* }"
18123
18124  # Input might be given as Windows format, start by converting to
18125  # unix format.
18126  new_path="$path"
18127
18128  windows_path="$new_path"
18129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18130    unix_path=`$CYGPATH -u "$windows_path"`
18131    new_path="$unix_path"
18132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18134    new_path="$unix_path"
18135  fi
18136
18137
18138  # Now try to locate executable using which
18139  new_path=`$WHICH "$new_path" 2> /dev/null`
18140
18141  if test "x$new_path" = x; then
18142    # Oops. Which didn't find the executable.
18143    # The splitting of arguments from the executable at a space might have been incorrect,
18144    # since paths with space are more likely in Windows. Give it another try with the whole
18145    # argument.
18146    path="$complete"
18147    arguments="EOL"
18148    new_path="$path"
18149
18150  windows_path="$new_path"
18151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18152    unix_path=`$CYGPATH -u "$windows_path"`
18153    new_path="$unix_path"
18154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18156    new_path="$unix_path"
18157  fi
18158
18159
18160    new_path=`$WHICH "$new_path" 2> /dev/null`
18161    # bat and cmd files are not always considered executable in MSYS causing which
18162    # to not find them
18163    if test "x$new_path" = x \
18164        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18165        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18166      new_path="$path"
18167
18168  windows_path="$new_path"
18169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18170    unix_path=`$CYGPATH -u "$windows_path"`
18171    new_path="$unix_path"
18172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18174    new_path="$unix_path"
18175  fi
18176
18177    fi
18178
18179    if test "x$new_path" = x; then
18180      # It's still not found. Now this is an unrecoverable error.
18181      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18182$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18183      has_space=`$ECHO "$complete" | $GREP " "`
18184      if test "x$has_space" != x; then
18185        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18186$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18187      fi
18188      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18189    fi
18190  fi
18191
18192  # Now new_path has a complete unix path to the binary
18193  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18194    # Keep paths in /bin as-is, but remove trailing .exe if any
18195    new_path="${new_path/%.exe/}"
18196    # Do not save /bin paths to all_fixpath_prefixes!
18197  else
18198    # Not in mixed or Windows style, start by that.
18199    new_path=`cmd //c echo $new_path`
18200
18201  input_path="$new_path"
18202  # Check if we need to convert this using DOS-style short mode. If the path
18203  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18204  # take no chances and rewrite it.
18205  # Note: m4 eats our [], so we need to use [ and ] instead.
18206  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18207  if test "x$has_forbidden_chars" != x; then
18208    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18209    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18210  fi
18211
18212    # Output is in $new_path
18213
18214  windows_path="$new_path"
18215  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18216    unix_path=`$CYGPATH -u "$windows_path"`
18217    new_path="$unix_path"
18218  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18219    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18220    new_path="$unix_path"
18221  fi
18222
18223    # remove trailing .exe if any
18224    new_path="${new_path/%.exe/}"
18225
18226    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18227    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18228  fi
18229
18230    else
18231      # We're on a unix platform. Hooray! :)
18232      # First separate the path from the arguments. This will split at the first
18233      # space.
18234      complete="$FOUND_MAKE"
18235      path="${complete%% *}"
18236      tmp="$complete EOL"
18237      arguments="${tmp#* }"
18238
18239      # Cannot rely on the command "which" here since it doesn't always work.
18240      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18241      if test -z "$is_absolute_path"; then
18242        # Path to executable is not absolute. Find it.
18243        IFS_save="$IFS"
18244        IFS=:
18245        for p in $PATH; do
18246          if test -f "$p/$path" && test -x "$p/$path"; then
18247            new_path="$p/$path"
18248            break
18249          fi
18250        done
18251        IFS="$IFS_save"
18252      else
18253        # This is an absolute path, we can use it without further modifications.
18254        new_path="$path"
18255      fi
18256
18257      if test "x$new_path" = x; then
18258        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18259$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18260        has_space=`$ECHO "$complete" | $GREP " "`
18261        if test "x$has_space" != x; then
18262          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18263$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18264        fi
18265        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18266      fi
18267    fi
18268
18269    # Now join together the path and the arguments once again
18270    if test "x$arguments" != xEOL; then
18271      new_complete="$new_path ${arguments% *}"
18272    else
18273      new_complete="$new_path"
18274    fi
18275
18276    if test "x$complete" != "x$new_complete"; then
18277      FOUND_MAKE="$new_complete"
18278      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18279$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18280    fi
18281  fi
18282
18283        fi
18284      fi
18285    fi
18286  fi
18287
18288    fi
18289
18290    if test "x$FOUND_MAKE" = x; then
18291      if test "x$TOOLCHAIN_PATH" != x; then
18292        # We have a toolchain path, check that as well before giving up.
18293        OLD_PATH=$PATH
18294        PATH=$TOOLCHAIN_PATH:$PATH
18295        for ac_prog in gmake
18296do
18297  # Extract the first word of "$ac_prog", so it can be a program name with args.
18298set dummy $ac_prog; ac_word=$2
18299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18300$as_echo_n "checking for $ac_word... " >&6; }
18301if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18302  $as_echo_n "(cached) " >&6
18303else
18304  case $CHECK_TOOLSDIR_GMAKE in
18305  [\\/]* | ?:[\\/]*)
18306  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18307  ;;
18308  *)
18309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18310for as_dir in $PATH
18311do
18312  IFS=$as_save_IFS
18313  test -z "$as_dir" && as_dir=.
18314    for ac_exec_ext in '' $ac_executable_extensions; do
18315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18316    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18318    break 2
18319  fi
18320done
18321  done
18322IFS=$as_save_IFS
18323
18324  ;;
18325esac
18326fi
18327CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18328if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18330$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18331else
18332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18333$as_echo "no" >&6; }
18334fi
18335
18336
18337  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18338done
18339
18340
18341  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18342  DESCRIPTION="gmake in tools-dir"
18343
18344  # On Cygwin, we require a newer version of make than on other platforms
18345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18346    MAKE_VERSION_EXPR="-e 4\."
18347    MAKE_REQUIRED_VERSION="4.0"
18348   else
18349    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18350    MAKE_REQUIRED_VERSION="3.81"
18351  fi
18352
18353  if test "x$MAKE_CANDIDATE" != x; then
18354    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18355$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18356    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18357    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18358    if test "x$IS_GNU_MAKE" = x; then
18359      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18360$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18361    else
18362      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18363      if test "x$IS_MODERN_MAKE" = x; then
18364        { $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
18365$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;}
18366      else
18367        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18368          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18369            MAKE_EXPECTED_ENV='cygwin'
18370          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18371            MAKE_EXPECTED_ENV='msys'
18372          else
18373            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18374          fi
18375          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18376          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18377        else
18378          # Not relevant for non-Windows
18379          IS_MAKE_CORRECT_ENV=true
18380        fi
18381        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18382          { $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
18383$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;}
18384        else
18385          FOUND_MAKE=$MAKE_CANDIDATE
18386
18387  # Only process if variable expands to non-empty
18388
18389  if test "x$FOUND_MAKE" != x; then
18390    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18391
18392  # First separate the path from the arguments. This will split at the first
18393  # space.
18394  complete="$FOUND_MAKE"
18395  path="${complete%% *}"
18396  tmp="$complete EOL"
18397  arguments="${tmp#* }"
18398
18399  # Input might be given as Windows format, start by converting to
18400  # unix format.
18401  new_path=`$CYGPATH -u "$path"`
18402
18403  # Now try to locate executable using which
18404  new_path=`$WHICH "$new_path" 2> /dev/null`
18405  # bat and cmd files are not always considered executable in cygwin causing which
18406  # to not find them
18407  if test "x$new_path" = x \
18408      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18409      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18410    new_path=`$CYGPATH -u "$path"`
18411  fi
18412  if test "x$new_path" = x; then
18413    # Oops. Which didn't find the executable.
18414    # The splitting of arguments from the executable at a space might have been incorrect,
18415    # since paths with space are more likely in Windows. Give it another try with the whole
18416    # argument.
18417    path="$complete"
18418    arguments="EOL"
18419    new_path=`$CYGPATH -u "$path"`
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      # It's still not found. Now this is an unrecoverable error.
18430      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18431$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18432      has_space=`$ECHO "$complete" | $GREP " "`
18433      if test "x$has_space" != x; then
18434        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18435$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18436      fi
18437      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18438    fi
18439  fi
18440
18441  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18442  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18443  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18444  # "foo.exe" is OK but "foo" is an error.
18445  #
18446  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18447  # It is also a way to make sure we got the proper file name for the real test later on.
18448  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18449  if test "x$test_shortpath" = x; then
18450    # Short path failed, file does not exist as specified.
18451    # Try adding .exe or .cmd
18452    if test -f "${new_path}.exe"; then
18453      input_to_shortpath="${new_path}.exe"
18454    elif test -f "${new_path}.cmd"; then
18455      input_to_shortpath="${new_path}.cmd"
18456    else
18457      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18458$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18459      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18460$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18461      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18462    fi
18463  else
18464    input_to_shortpath="$new_path"
18465  fi
18466
18467  # Call helper function which possibly converts this using DOS-style short mode.
18468  # If so, the updated path is stored in $new_path.
18469  new_path="$input_to_shortpath"
18470
18471  input_path="$input_to_shortpath"
18472  # Check if we need to convert this using DOS-style short mode. If the path
18473  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18474  # take no chances and rewrite it.
18475  # Note: m4 eats our [], so we need to use [ and ] instead.
18476  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18477  if test "x$has_forbidden_chars" != x; then
18478    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18479    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18480    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18481    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18482      # Going to short mode and back again did indeed matter. Since short mode is
18483      # case insensitive, let's make it lowercase to improve readability.
18484      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18485      # Now convert it back to Unix-style (cygpath)
18486      input_path=`$CYGPATH -u "$shortmode_path"`
18487      new_path="$input_path"
18488    fi
18489  fi
18490
18491  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18492  if test "x$test_cygdrive_prefix" = x; then
18493    # As a simple fix, exclude /usr/bin since it's not a real path.
18494    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18495      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18496      # a path prefixed by /cygdrive for fixpath to work.
18497      new_path="$CYGWIN_ROOT_PATH$input_path"
18498    fi
18499  fi
18500
18501  # remove trailing .exe if any
18502  new_path="${new_path/%.exe/}"
18503
18504    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18505
18506  # First separate the path from the arguments. This will split at the first
18507  # space.
18508  complete="$FOUND_MAKE"
18509  path="${complete%% *}"
18510  tmp="$complete EOL"
18511  arguments="${tmp#* }"
18512
18513  # Input might be given as Windows format, start by converting to
18514  # unix format.
18515  new_path="$path"
18516
18517  windows_path="$new_path"
18518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18519    unix_path=`$CYGPATH -u "$windows_path"`
18520    new_path="$unix_path"
18521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18522    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18523    new_path="$unix_path"
18524  fi
18525
18526
18527  # Now try to locate executable using which
18528  new_path=`$WHICH "$new_path" 2> /dev/null`
18529
18530  if test "x$new_path" = x; then
18531    # Oops. Which didn't find the executable.
18532    # The splitting of arguments from the executable at a space might have been incorrect,
18533    # since paths with space are more likely in Windows. Give it another try with the whole
18534    # argument.
18535    path="$complete"
18536    arguments="EOL"
18537    new_path="$path"
18538
18539  windows_path="$new_path"
18540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18541    unix_path=`$CYGPATH -u "$windows_path"`
18542    new_path="$unix_path"
18543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18545    new_path="$unix_path"
18546  fi
18547
18548
18549    new_path=`$WHICH "$new_path" 2> /dev/null`
18550    # bat and cmd files are not always considered executable in MSYS causing which
18551    # to not find them
18552    if test "x$new_path" = x \
18553        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18554        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18555      new_path="$path"
18556
18557  windows_path="$new_path"
18558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18559    unix_path=`$CYGPATH -u "$windows_path"`
18560    new_path="$unix_path"
18561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18563    new_path="$unix_path"
18564  fi
18565
18566    fi
18567
18568    if test "x$new_path" = x; then
18569      # It's still not found. Now this is an unrecoverable error.
18570      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18571$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18572      has_space=`$ECHO "$complete" | $GREP " "`
18573      if test "x$has_space" != x; then
18574        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18575$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18576      fi
18577      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18578    fi
18579  fi
18580
18581  # Now new_path has a complete unix path to the binary
18582  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18583    # Keep paths in /bin as-is, but remove trailing .exe if any
18584    new_path="${new_path/%.exe/}"
18585    # Do not save /bin paths to all_fixpath_prefixes!
18586  else
18587    # Not in mixed or Windows style, start by that.
18588    new_path=`cmd //c echo $new_path`
18589
18590  input_path="$new_path"
18591  # Check if we need to convert this using DOS-style short mode. If the path
18592  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18593  # take no chances and rewrite it.
18594  # Note: m4 eats our [], so we need to use [ and ] instead.
18595  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18596  if test "x$has_forbidden_chars" != x; then
18597    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18598    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18599  fi
18600
18601    # Output is in $new_path
18602
18603  windows_path="$new_path"
18604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18605    unix_path=`$CYGPATH -u "$windows_path"`
18606    new_path="$unix_path"
18607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18608    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18609    new_path="$unix_path"
18610  fi
18611
18612    # remove trailing .exe if any
18613    new_path="${new_path/%.exe/}"
18614
18615    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18616    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18617  fi
18618
18619    else
18620      # We're on a unix platform. Hooray! :)
18621      # First separate the path from the arguments. This will split at the first
18622      # space.
18623      complete="$FOUND_MAKE"
18624      path="${complete%% *}"
18625      tmp="$complete EOL"
18626      arguments="${tmp#* }"
18627
18628      # Cannot rely on the command "which" here since it doesn't always work.
18629      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18630      if test -z "$is_absolute_path"; then
18631        # Path to executable is not absolute. Find it.
18632        IFS_save="$IFS"
18633        IFS=:
18634        for p in $PATH; do
18635          if test -f "$p/$path" && test -x "$p/$path"; then
18636            new_path="$p/$path"
18637            break
18638          fi
18639        done
18640        IFS="$IFS_save"
18641      else
18642        # This is an absolute path, we can use it without further modifications.
18643        new_path="$path"
18644      fi
18645
18646      if test "x$new_path" = x; then
18647        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18648$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18649        has_space=`$ECHO "$complete" | $GREP " "`
18650        if test "x$has_space" != x; then
18651          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18652$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18653        fi
18654        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18655      fi
18656    fi
18657
18658    # Now join together the path and the arguments once again
18659    if test "x$arguments" != xEOL; then
18660      new_complete="$new_path ${arguments% *}"
18661    else
18662      new_complete="$new_path"
18663    fi
18664
18665    if test "x$complete" != "x$new_complete"; then
18666      FOUND_MAKE="$new_complete"
18667      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18668$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18669    fi
18670  fi
18671
18672        fi
18673      fi
18674    fi
18675  fi
18676
18677        if test "x$FOUND_MAKE" = x; then
18678          for ac_prog in make
18679do
18680  # Extract the first word of "$ac_prog", so it can be a program name with args.
18681set dummy $ac_prog; ac_word=$2
18682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18683$as_echo_n "checking for $ac_word... " >&6; }
18684if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18685  $as_echo_n "(cached) " >&6
18686else
18687  case $CHECK_TOOLSDIR_MAKE in
18688  [\\/]* | ?:[\\/]*)
18689  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18690  ;;
18691  *)
18692  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18693for as_dir in $PATH
18694do
18695  IFS=$as_save_IFS
18696  test -z "$as_dir" && as_dir=.
18697    for ac_exec_ext in '' $ac_executable_extensions; do
18698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18699    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18701    break 2
18702  fi
18703done
18704  done
18705IFS=$as_save_IFS
18706
18707  ;;
18708esac
18709fi
18710CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18711if test -n "$CHECK_TOOLSDIR_MAKE"; then
18712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18713$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18714else
18715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18716$as_echo "no" >&6; }
18717fi
18718
18719
18720  test -n "$CHECK_TOOLSDIR_MAKE" && break
18721done
18722
18723
18724  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18725  DESCRIPTION="make in tools-dir"
18726
18727  # On Cygwin, we require a newer version of make than on other platforms
18728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18729    MAKE_VERSION_EXPR="-e 4\."
18730    MAKE_REQUIRED_VERSION="4.0"
18731   else
18732    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18733    MAKE_REQUIRED_VERSION="3.81"
18734  fi
18735
18736  if test "x$MAKE_CANDIDATE" != x; then
18737    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18738$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18739    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18740    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18741    if test "x$IS_GNU_MAKE" = x; then
18742      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18743$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18744    else
18745      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18746      if test "x$IS_MODERN_MAKE" = x; then
18747        { $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
18748$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;}
18749      else
18750        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18751          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18752            MAKE_EXPECTED_ENV='cygwin'
18753          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18754            MAKE_EXPECTED_ENV='msys'
18755          else
18756            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18757          fi
18758          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18759          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18760        else
18761          # Not relevant for non-Windows
18762          IS_MAKE_CORRECT_ENV=true
18763        fi
18764        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18765          { $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
18766$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;}
18767        else
18768          FOUND_MAKE=$MAKE_CANDIDATE
18769
18770  # Only process if variable expands to non-empty
18771
18772  if test "x$FOUND_MAKE" != x; then
18773    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18774
18775  # First separate the path from the arguments. This will split at the first
18776  # space.
18777  complete="$FOUND_MAKE"
18778  path="${complete%% *}"
18779  tmp="$complete EOL"
18780  arguments="${tmp#* }"
18781
18782  # Input might be given as Windows format, start by converting to
18783  # unix format.
18784  new_path=`$CYGPATH -u "$path"`
18785
18786  # Now try to locate executable using which
18787  new_path=`$WHICH "$new_path" 2> /dev/null`
18788  # bat and cmd files are not always considered executable in cygwin causing which
18789  # to not find them
18790  if test "x$new_path" = x \
18791      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18792      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18793    new_path=`$CYGPATH -u "$path"`
18794  fi
18795  if test "x$new_path" = x; then
18796    # Oops. Which didn't find the executable.
18797    # The splitting of arguments from the executable at a space might have been incorrect,
18798    # since paths with space are more likely in Windows. Give it another try with the whole
18799    # argument.
18800    path="$complete"
18801    arguments="EOL"
18802    new_path=`$CYGPATH -u "$path"`
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      # It's still not found. Now this is an unrecoverable error.
18813      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18814$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18815      has_space=`$ECHO "$complete" | $GREP " "`
18816      if test "x$has_space" != x; then
18817        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18818$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18819      fi
18820      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18821    fi
18822  fi
18823
18824  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18825  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18826  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18827  # "foo.exe" is OK but "foo" is an error.
18828  #
18829  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18830  # It is also a way to make sure we got the proper file name for the real test later on.
18831  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18832  if test "x$test_shortpath" = x; then
18833    # Short path failed, file does not exist as specified.
18834    # Try adding .exe or .cmd
18835    if test -f "${new_path}.exe"; then
18836      input_to_shortpath="${new_path}.exe"
18837    elif test -f "${new_path}.cmd"; then
18838      input_to_shortpath="${new_path}.cmd"
18839    else
18840      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18841$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18842      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18843$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18844      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18845    fi
18846  else
18847    input_to_shortpath="$new_path"
18848  fi
18849
18850  # Call helper function which possibly converts this using DOS-style short mode.
18851  # If so, the updated path is stored in $new_path.
18852  new_path="$input_to_shortpath"
18853
18854  input_path="$input_to_shortpath"
18855  # Check if we need to convert this using DOS-style short mode. If the path
18856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18857  # take no chances and rewrite it.
18858  # Note: m4 eats our [], so we need to use [ and ] instead.
18859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18860  if test "x$has_forbidden_chars" != x; then
18861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18862    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18863    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18864    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18865      # Going to short mode and back again did indeed matter. Since short mode is
18866      # case insensitive, let's make it lowercase to improve readability.
18867      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18868      # Now convert it back to Unix-style (cygpath)
18869      input_path=`$CYGPATH -u "$shortmode_path"`
18870      new_path="$input_path"
18871    fi
18872  fi
18873
18874  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18875  if test "x$test_cygdrive_prefix" = x; then
18876    # As a simple fix, exclude /usr/bin since it's not a real path.
18877    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18878      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18879      # a path prefixed by /cygdrive for fixpath to work.
18880      new_path="$CYGWIN_ROOT_PATH$input_path"
18881    fi
18882  fi
18883
18884  # remove trailing .exe if any
18885  new_path="${new_path/%.exe/}"
18886
18887    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18888
18889  # First separate the path from the arguments. This will split at the first
18890  # space.
18891  complete="$FOUND_MAKE"
18892  path="${complete%% *}"
18893  tmp="$complete EOL"
18894  arguments="${tmp#* }"
18895
18896  # Input might be given as Windows format, start by converting to
18897  # unix format.
18898  new_path="$path"
18899
18900  windows_path="$new_path"
18901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18902    unix_path=`$CYGPATH -u "$windows_path"`
18903    new_path="$unix_path"
18904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18906    new_path="$unix_path"
18907  fi
18908
18909
18910  # Now try to locate executable using which
18911  new_path=`$WHICH "$new_path" 2> /dev/null`
18912
18913  if test "x$new_path" = x; then
18914    # Oops. Which didn't find the executable.
18915    # The splitting of arguments from the executable at a space might have been incorrect,
18916    # since paths with space are more likely in Windows. Give it another try with the whole
18917    # argument.
18918    path="$complete"
18919    arguments="EOL"
18920    new_path="$path"
18921
18922  windows_path="$new_path"
18923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18924    unix_path=`$CYGPATH -u "$windows_path"`
18925    new_path="$unix_path"
18926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18928    new_path="$unix_path"
18929  fi
18930
18931
18932    new_path=`$WHICH "$new_path" 2> /dev/null`
18933    # bat and cmd files are not always considered executable in MSYS causing which
18934    # to not find them
18935    if test "x$new_path" = x \
18936        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18937        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18938      new_path="$path"
18939
18940  windows_path="$new_path"
18941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18942    unix_path=`$CYGPATH -u "$windows_path"`
18943    new_path="$unix_path"
18944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18946    new_path="$unix_path"
18947  fi
18948
18949    fi
18950
18951    if test "x$new_path" = x; then
18952      # It's still not found. Now this is an unrecoverable error.
18953      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18954$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18955      has_space=`$ECHO "$complete" | $GREP " "`
18956      if test "x$has_space" != x; then
18957        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18958$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18959      fi
18960      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18961    fi
18962  fi
18963
18964  # Now new_path has a complete unix path to the binary
18965  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18966    # Keep paths in /bin as-is, but remove trailing .exe if any
18967    new_path="${new_path/%.exe/}"
18968    # Do not save /bin paths to all_fixpath_prefixes!
18969  else
18970    # Not in mixed or Windows style, start by that.
18971    new_path=`cmd //c echo $new_path`
18972
18973  input_path="$new_path"
18974  # Check if we need to convert this using DOS-style short mode. If the path
18975  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18976  # take no chances and rewrite it.
18977  # Note: m4 eats our [], so we need to use [ and ] instead.
18978  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18979  if test "x$has_forbidden_chars" != x; then
18980    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18981    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18982  fi
18983
18984    # Output is in $new_path
18985
18986  windows_path="$new_path"
18987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18988    unix_path=`$CYGPATH -u "$windows_path"`
18989    new_path="$unix_path"
18990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18992    new_path="$unix_path"
18993  fi
18994
18995    # remove trailing .exe if any
18996    new_path="${new_path/%.exe/}"
18997
18998    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18999    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19000  fi
19001
19002    else
19003      # We're on a unix platform. Hooray! :)
19004      # First separate the path from the arguments. This will split at the first
19005      # space.
19006      complete="$FOUND_MAKE"
19007      path="${complete%% *}"
19008      tmp="$complete EOL"
19009      arguments="${tmp#* }"
19010
19011      # Cannot rely on the command "which" here since it doesn't always work.
19012      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19013      if test -z "$is_absolute_path"; then
19014        # Path to executable is not absolute. Find it.
19015        IFS_save="$IFS"
19016        IFS=:
19017        for p in $PATH; do
19018          if test -f "$p/$path" && test -x "$p/$path"; then
19019            new_path="$p/$path"
19020            break
19021          fi
19022        done
19023        IFS="$IFS_save"
19024      else
19025        # This is an absolute path, we can use it without further modifications.
19026        new_path="$path"
19027      fi
19028
19029      if test "x$new_path" = x; then
19030        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19031$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19032        has_space=`$ECHO "$complete" | $GREP " "`
19033        if test "x$has_space" != x; then
19034          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19035$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19036        fi
19037        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19038      fi
19039    fi
19040
19041    # Now join together the path and the arguments once again
19042    if test "x$arguments" != xEOL; then
19043      new_complete="$new_path ${arguments% *}"
19044    else
19045      new_complete="$new_path"
19046    fi
19047
19048    if test "x$complete" != "x$new_complete"; then
19049      FOUND_MAKE="$new_complete"
19050      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19051$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19052    fi
19053  fi
19054
19055        fi
19056      fi
19057    fi
19058  fi
19059
19060        fi
19061        PATH=$OLD_PATH
19062      fi
19063    fi
19064
19065    if test "x$FOUND_MAKE" = x; then
19066      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
19067    fi
19068
19069  else
19070    # The variable is set, but is it from the command line or the environment?
19071
19072    # Try to remove the string !MAKE! from our list.
19073    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19074    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19075      # If it failed, the variable was not from the command line. Ignore it,
19076      # but warn the user (except for BASH, which is always set by the calling BASH).
19077      if test "xMAKE" != xBASH; then
19078        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19079$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19080      fi
19081      # Try to locate tool using the code snippet
19082
19083    # Try our hardest to locate a correct version of GNU make
19084    for ac_prog in gmake
19085do
19086  # Extract the first word of "$ac_prog", so it can be a program name with args.
19087set dummy $ac_prog; ac_word=$2
19088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19089$as_echo_n "checking for $ac_word... " >&6; }
19090if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19091  $as_echo_n "(cached) " >&6
19092else
19093  case $CHECK_GMAKE in
19094  [\\/]* | ?:[\\/]*)
19095  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19096  ;;
19097  *)
19098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19099for as_dir in $PATH
19100do
19101  IFS=$as_save_IFS
19102  test -z "$as_dir" && as_dir=.
19103    for ac_exec_ext in '' $ac_executable_extensions; do
19104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19105    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19107    break 2
19108  fi
19109done
19110  done
19111IFS=$as_save_IFS
19112
19113  ;;
19114esac
19115fi
19116CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19117if test -n "$CHECK_GMAKE"; then
19118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19119$as_echo "$CHECK_GMAKE" >&6; }
19120else
19121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19122$as_echo "no" >&6; }
19123fi
19124
19125
19126  test -n "$CHECK_GMAKE" && break
19127done
19128
19129
19130  MAKE_CANDIDATE=""$CHECK_GMAKE""
19131  DESCRIPTION="gmake in PATH"
19132
19133  # On Cygwin, we require a newer version of make than on other platforms
19134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19135    MAKE_VERSION_EXPR="-e 4\."
19136    MAKE_REQUIRED_VERSION="4.0"
19137   else
19138    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19139    MAKE_REQUIRED_VERSION="3.81"
19140  fi
19141
19142  if test "x$MAKE_CANDIDATE" != x; then
19143    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19144$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19145    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19146    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19147    if test "x$IS_GNU_MAKE" = x; then
19148      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19149$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19150    else
19151      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19152      if test "x$IS_MODERN_MAKE" = x; then
19153        { $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
19154$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;}
19155      else
19156        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19157          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19158            MAKE_EXPECTED_ENV='cygwin'
19159          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19160            MAKE_EXPECTED_ENV='msys'
19161          else
19162            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19163          fi
19164          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19165          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19166        else
19167          # Not relevant for non-Windows
19168          IS_MAKE_CORRECT_ENV=true
19169        fi
19170        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19171          { $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
19172$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;}
19173        else
19174          FOUND_MAKE=$MAKE_CANDIDATE
19175
19176  # Only process if variable expands to non-empty
19177
19178  if test "x$FOUND_MAKE" != x; then
19179    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19180
19181  # First separate the path from the arguments. This will split at the first
19182  # space.
19183  complete="$FOUND_MAKE"
19184  path="${complete%% *}"
19185  tmp="$complete EOL"
19186  arguments="${tmp#* }"
19187
19188  # Input might be given as Windows format, start by converting to
19189  # unix format.
19190  new_path=`$CYGPATH -u "$path"`
19191
19192  # Now try to locate executable using which
19193  new_path=`$WHICH "$new_path" 2> /dev/null`
19194  # bat and cmd files are not always considered executable in cygwin causing which
19195  # to not find them
19196  if test "x$new_path" = x \
19197      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19198      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19199    new_path=`$CYGPATH -u "$path"`
19200  fi
19201  if test "x$new_path" = x; then
19202    # Oops. Which didn't find the executable.
19203    # The splitting of arguments from the executable at a space might have been incorrect,
19204    # since paths with space are more likely in Windows. Give it another try with the whole
19205    # argument.
19206    path="$complete"
19207    arguments="EOL"
19208    new_path=`$CYGPATH -u "$path"`
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      # It's still not found. Now this is an unrecoverable error.
19219      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19220$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19221      has_space=`$ECHO "$complete" | $GREP " "`
19222      if test "x$has_space" != x; then
19223        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19224$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19225      fi
19226      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19227    fi
19228  fi
19229
19230  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19231  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19232  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19233  # "foo.exe" is OK but "foo" is an error.
19234  #
19235  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19236  # It is also a way to make sure we got the proper file name for the real test later on.
19237  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19238  if test "x$test_shortpath" = x; then
19239    # Short path failed, file does not exist as specified.
19240    # Try adding .exe or .cmd
19241    if test -f "${new_path}.exe"; then
19242      input_to_shortpath="${new_path}.exe"
19243    elif test -f "${new_path}.cmd"; then
19244      input_to_shortpath="${new_path}.cmd"
19245    else
19246      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19247$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19248      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19249$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19250      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19251    fi
19252  else
19253    input_to_shortpath="$new_path"
19254  fi
19255
19256  # Call helper function which possibly converts this using DOS-style short mode.
19257  # If so, the updated path is stored in $new_path.
19258  new_path="$input_to_shortpath"
19259
19260  input_path="$input_to_shortpath"
19261  # Check if we need to convert this using DOS-style short mode. If the path
19262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19263  # take no chances and rewrite it.
19264  # Note: m4 eats our [], so we need to use [ and ] instead.
19265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19266  if test "x$has_forbidden_chars" != x; then
19267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19268    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19269    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19270    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19271      # Going to short mode and back again did indeed matter. Since short mode is
19272      # case insensitive, let's make it lowercase to improve readability.
19273      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19274      # Now convert it back to Unix-style (cygpath)
19275      input_path=`$CYGPATH -u "$shortmode_path"`
19276      new_path="$input_path"
19277    fi
19278  fi
19279
19280  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19281  if test "x$test_cygdrive_prefix" = x; then
19282    # As a simple fix, exclude /usr/bin since it's not a real path.
19283    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19284      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19285      # a path prefixed by /cygdrive for fixpath to work.
19286      new_path="$CYGWIN_ROOT_PATH$input_path"
19287    fi
19288  fi
19289
19290  # remove trailing .exe if any
19291  new_path="${new_path/%.exe/}"
19292
19293    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19294
19295  # First separate the path from the arguments. This will split at the first
19296  # space.
19297  complete="$FOUND_MAKE"
19298  path="${complete%% *}"
19299  tmp="$complete EOL"
19300  arguments="${tmp#* }"
19301
19302  # Input might be given as Windows format, start by converting to
19303  # unix format.
19304  new_path="$path"
19305
19306  windows_path="$new_path"
19307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19308    unix_path=`$CYGPATH -u "$windows_path"`
19309    new_path="$unix_path"
19310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19311    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19312    new_path="$unix_path"
19313  fi
19314
19315
19316  # Now try to locate executable using which
19317  new_path=`$WHICH "$new_path" 2> /dev/null`
19318
19319  if test "x$new_path" = x; then
19320    # Oops. Which didn't find the executable.
19321    # The splitting of arguments from the executable at a space might have been incorrect,
19322    # since paths with space are more likely in Windows. Give it another try with the whole
19323    # argument.
19324    path="$complete"
19325    arguments="EOL"
19326    new_path="$path"
19327
19328  windows_path="$new_path"
19329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19330    unix_path=`$CYGPATH -u "$windows_path"`
19331    new_path="$unix_path"
19332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19334    new_path="$unix_path"
19335  fi
19336
19337
19338    new_path=`$WHICH "$new_path" 2> /dev/null`
19339    # bat and cmd files are not always considered executable in MSYS causing which
19340    # to not find them
19341    if test "x$new_path" = x \
19342        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19343        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19344      new_path="$path"
19345
19346  windows_path="$new_path"
19347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19348    unix_path=`$CYGPATH -u "$windows_path"`
19349    new_path="$unix_path"
19350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19351    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19352    new_path="$unix_path"
19353  fi
19354
19355    fi
19356
19357    if test "x$new_path" = x; then
19358      # It's still not found. Now this is an unrecoverable error.
19359      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19360$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19361      has_space=`$ECHO "$complete" | $GREP " "`
19362      if test "x$has_space" != x; then
19363        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19364$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19365      fi
19366      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19367    fi
19368  fi
19369
19370  # Now new_path has a complete unix path to the binary
19371  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19372    # Keep paths in /bin as-is, but remove trailing .exe if any
19373    new_path="${new_path/%.exe/}"
19374    # Do not save /bin paths to all_fixpath_prefixes!
19375  else
19376    # Not in mixed or Windows style, start by that.
19377    new_path=`cmd //c echo $new_path`
19378
19379  input_path="$new_path"
19380  # Check if we need to convert this using DOS-style short mode. If the path
19381  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19382  # take no chances and rewrite it.
19383  # Note: m4 eats our [], so we need to use [ and ] instead.
19384  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19385  if test "x$has_forbidden_chars" != x; then
19386    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19387    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19388  fi
19389
19390    # Output is in $new_path
19391
19392  windows_path="$new_path"
19393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19394    unix_path=`$CYGPATH -u "$windows_path"`
19395    new_path="$unix_path"
19396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19398    new_path="$unix_path"
19399  fi
19400
19401    # remove trailing .exe if any
19402    new_path="${new_path/%.exe/}"
19403
19404    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19405    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19406  fi
19407
19408    else
19409      # We're on a unix platform. Hooray! :)
19410      # First separate the path from the arguments. This will split at the first
19411      # space.
19412      complete="$FOUND_MAKE"
19413      path="${complete%% *}"
19414      tmp="$complete EOL"
19415      arguments="${tmp#* }"
19416
19417      # Cannot rely on the command "which" here since it doesn't always work.
19418      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19419      if test -z "$is_absolute_path"; then
19420        # Path to executable is not absolute. Find it.
19421        IFS_save="$IFS"
19422        IFS=:
19423        for p in $PATH; do
19424          if test -f "$p/$path" && test -x "$p/$path"; then
19425            new_path="$p/$path"
19426            break
19427          fi
19428        done
19429        IFS="$IFS_save"
19430      else
19431        # This is an absolute path, we can use it without further modifications.
19432        new_path="$path"
19433      fi
19434
19435      if test "x$new_path" = x; then
19436        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19437$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19438        has_space=`$ECHO "$complete" | $GREP " "`
19439        if test "x$has_space" != x; then
19440          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19441$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19442        fi
19443        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19444      fi
19445    fi
19446
19447    # Now join together the path and the arguments once again
19448    if test "x$arguments" != xEOL; then
19449      new_complete="$new_path ${arguments% *}"
19450    else
19451      new_complete="$new_path"
19452    fi
19453
19454    if test "x$complete" != "x$new_complete"; then
19455      FOUND_MAKE="$new_complete"
19456      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19457$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19458    fi
19459  fi
19460
19461        fi
19462      fi
19463    fi
19464  fi
19465
19466
19467    if test "x$FOUND_MAKE" = x; then
19468      for ac_prog in make
19469do
19470  # Extract the first word of "$ac_prog", so it can be a program name with args.
19471set dummy $ac_prog; ac_word=$2
19472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19473$as_echo_n "checking for $ac_word... " >&6; }
19474if ${ac_cv_path_CHECK_MAKE+:} false; then :
19475  $as_echo_n "(cached) " >&6
19476else
19477  case $CHECK_MAKE in
19478  [\\/]* | ?:[\\/]*)
19479  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19480  ;;
19481  *)
19482  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19483for as_dir in $PATH
19484do
19485  IFS=$as_save_IFS
19486  test -z "$as_dir" && as_dir=.
19487    for ac_exec_ext in '' $ac_executable_extensions; do
19488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19489    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19491    break 2
19492  fi
19493done
19494  done
19495IFS=$as_save_IFS
19496
19497  ;;
19498esac
19499fi
19500CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19501if test -n "$CHECK_MAKE"; then
19502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19503$as_echo "$CHECK_MAKE" >&6; }
19504else
19505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19506$as_echo "no" >&6; }
19507fi
19508
19509
19510  test -n "$CHECK_MAKE" && break
19511done
19512
19513
19514  MAKE_CANDIDATE=""$CHECK_MAKE""
19515  DESCRIPTION="make in PATH"
19516
19517  # On Cygwin, we require a newer version of make than on other platforms
19518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19519    MAKE_VERSION_EXPR="-e 4\."
19520    MAKE_REQUIRED_VERSION="4.0"
19521   else
19522    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19523    MAKE_REQUIRED_VERSION="3.81"
19524  fi
19525
19526  if test "x$MAKE_CANDIDATE" != x; then
19527    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19528$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19529    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19530    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19531    if test "x$IS_GNU_MAKE" = x; then
19532      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19533$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19534    else
19535      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19536      if test "x$IS_MODERN_MAKE" = x; then
19537        { $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
19538$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;}
19539      else
19540        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19541          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19542            MAKE_EXPECTED_ENV='cygwin'
19543          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19544            MAKE_EXPECTED_ENV='msys'
19545          else
19546            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19547          fi
19548          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19549          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19550        else
19551          # Not relevant for non-Windows
19552          IS_MAKE_CORRECT_ENV=true
19553        fi
19554        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19555          { $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
19556$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;}
19557        else
19558          FOUND_MAKE=$MAKE_CANDIDATE
19559
19560  # Only process if variable expands to non-empty
19561
19562  if test "x$FOUND_MAKE" != x; then
19563    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19564
19565  # First separate the path from the arguments. This will split at the first
19566  # space.
19567  complete="$FOUND_MAKE"
19568  path="${complete%% *}"
19569  tmp="$complete EOL"
19570  arguments="${tmp#* }"
19571
19572  # Input might be given as Windows format, start by converting to
19573  # unix format.
19574  new_path=`$CYGPATH -u "$path"`
19575
19576  # Now try to locate executable using which
19577  new_path=`$WHICH "$new_path" 2> /dev/null`
19578  # bat and cmd files are not always considered executable in cygwin causing which
19579  # to not find them
19580  if test "x$new_path" = x \
19581      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19582      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19583    new_path=`$CYGPATH -u "$path"`
19584  fi
19585  if test "x$new_path" = x; then
19586    # Oops. Which didn't find the executable.
19587    # The splitting of arguments from the executable at a space might have been incorrect,
19588    # since paths with space are more likely in Windows. Give it another try with the whole
19589    # argument.
19590    path="$complete"
19591    arguments="EOL"
19592    new_path=`$CYGPATH -u "$path"`
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      # It's still not found. Now this is an unrecoverable error.
19603      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19604$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19605      has_space=`$ECHO "$complete" | $GREP " "`
19606      if test "x$has_space" != x; then
19607        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19608$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19609      fi
19610      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19611    fi
19612  fi
19613
19614  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19615  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19616  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19617  # "foo.exe" is OK but "foo" is an error.
19618  #
19619  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19620  # It is also a way to make sure we got the proper file name for the real test later on.
19621  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19622  if test "x$test_shortpath" = x; then
19623    # Short path failed, file does not exist as specified.
19624    # Try adding .exe or .cmd
19625    if test -f "${new_path}.exe"; then
19626      input_to_shortpath="${new_path}.exe"
19627    elif test -f "${new_path}.cmd"; then
19628      input_to_shortpath="${new_path}.cmd"
19629    else
19630      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19631$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19632      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19633$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19634      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19635    fi
19636  else
19637    input_to_shortpath="$new_path"
19638  fi
19639
19640  # Call helper function which possibly converts this using DOS-style short mode.
19641  # If so, the updated path is stored in $new_path.
19642  new_path="$input_to_shortpath"
19643
19644  input_path="$input_to_shortpath"
19645  # Check if we need to convert this using DOS-style short mode. If the path
19646  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19647  # take no chances and rewrite it.
19648  # Note: m4 eats our [], so we need to use [ and ] instead.
19649  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19650  if test "x$has_forbidden_chars" != x; then
19651    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19652    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19653    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19654    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19655      # Going to short mode and back again did indeed matter. Since short mode is
19656      # case insensitive, let's make it lowercase to improve readability.
19657      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19658      # Now convert it back to Unix-style (cygpath)
19659      input_path=`$CYGPATH -u "$shortmode_path"`
19660      new_path="$input_path"
19661    fi
19662  fi
19663
19664  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19665  if test "x$test_cygdrive_prefix" = x; then
19666    # As a simple fix, exclude /usr/bin since it's not a real path.
19667    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19668      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19669      # a path prefixed by /cygdrive for fixpath to work.
19670      new_path="$CYGWIN_ROOT_PATH$input_path"
19671    fi
19672  fi
19673
19674  # remove trailing .exe if any
19675  new_path="${new_path/%.exe/}"
19676
19677    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19678
19679  # First separate the path from the arguments. This will split at the first
19680  # space.
19681  complete="$FOUND_MAKE"
19682  path="${complete%% *}"
19683  tmp="$complete EOL"
19684  arguments="${tmp#* }"
19685
19686  # Input might be given as Windows format, start by converting to
19687  # unix format.
19688  new_path="$path"
19689
19690  windows_path="$new_path"
19691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19692    unix_path=`$CYGPATH -u "$windows_path"`
19693    new_path="$unix_path"
19694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19696    new_path="$unix_path"
19697  fi
19698
19699
19700  # Now try to locate executable using which
19701  new_path=`$WHICH "$new_path" 2> /dev/null`
19702
19703  if test "x$new_path" = x; then
19704    # Oops. Which didn't find the executable.
19705    # The splitting of arguments from the executable at a space might have been incorrect,
19706    # since paths with space are more likely in Windows. Give it another try with the whole
19707    # argument.
19708    path="$complete"
19709    arguments="EOL"
19710    new_path="$path"
19711
19712  windows_path="$new_path"
19713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19714    unix_path=`$CYGPATH -u "$windows_path"`
19715    new_path="$unix_path"
19716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19717    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19718    new_path="$unix_path"
19719  fi
19720
19721
19722    new_path=`$WHICH "$new_path" 2> /dev/null`
19723    # bat and cmd files are not always considered executable in MSYS causing which
19724    # to not find them
19725    if test "x$new_path" = x \
19726        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19727        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19728      new_path="$path"
19729
19730  windows_path="$new_path"
19731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19732    unix_path=`$CYGPATH -u "$windows_path"`
19733    new_path="$unix_path"
19734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19736    new_path="$unix_path"
19737  fi
19738
19739    fi
19740
19741    if test "x$new_path" = x; then
19742      # It's still not found. Now this is an unrecoverable error.
19743      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19744$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19745      has_space=`$ECHO "$complete" | $GREP " "`
19746      if test "x$has_space" != x; then
19747        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19748$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19749      fi
19750      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19751    fi
19752  fi
19753
19754  # Now new_path has a complete unix path to the binary
19755  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19756    # Keep paths in /bin as-is, but remove trailing .exe if any
19757    new_path="${new_path/%.exe/}"
19758    # Do not save /bin paths to all_fixpath_prefixes!
19759  else
19760    # Not in mixed or Windows style, start by that.
19761    new_path=`cmd //c echo $new_path`
19762
19763  input_path="$new_path"
19764  # Check if we need to convert this using DOS-style short mode. If the path
19765  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19766  # take no chances and rewrite it.
19767  # Note: m4 eats our [], so we need to use [ and ] instead.
19768  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19769  if test "x$has_forbidden_chars" != x; then
19770    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19771    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19772  fi
19773
19774    # Output is in $new_path
19775
19776  windows_path="$new_path"
19777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19778    unix_path=`$CYGPATH -u "$windows_path"`
19779    new_path="$unix_path"
19780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19781    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19782    new_path="$unix_path"
19783  fi
19784
19785    # remove trailing .exe if any
19786    new_path="${new_path/%.exe/}"
19787
19788    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19789    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19790  fi
19791
19792    else
19793      # We're on a unix platform. Hooray! :)
19794      # First separate the path from the arguments. This will split at the first
19795      # space.
19796      complete="$FOUND_MAKE"
19797      path="${complete%% *}"
19798      tmp="$complete EOL"
19799      arguments="${tmp#* }"
19800
19801      # Cannot rely on the command "which" here since it doesn't always work.
19802      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19803      if test -z "$is_absolute_path"; then
19804        # Path to executable is not absolute. Find it.
19805        IFS_save="$IFS"
19806        IFS=:
19807        for p in $PATH; do
19808          if test -f "$p/$path" && test -x "$p/$path"; then
19809            new_path="$p/$path"
19810            break
19811          fi
19812        done
19813        IFS="$IFS_save"
19814      else
19815        # This is an absolute path, we can use it without further modifications.
19816        new_path="$path"
19817      fi
19818
19819      if test "x$new_path" = x; then
19820        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19821$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19822        has_space=`$ECHO "$complete" | $GREP " "`
19823        if test "x$has_space" != x; then
19824          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19825$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19826        fi
19827        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19828      fi
19829    fi
19830
19831    # Now join together the path and the arguments once again
19832    if test "x$arguments" != xEOL; then
19833      new_complete="$new_path ${arguments% *}"
19834    else
19835      new_complete="$new_path"
19836    fi
19837
19838    if test "x$complete" != "x$new_complete"; then
19839      FOUND_MAKE="$new_complete"
19840      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19841$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19842    fi
19843  fi
19844
19845        fi
19846      fi
19847    fi
19848  fi
19849
19850    fi
19851
19852    if test "x$FOUND_MAKE" = x; then
19853      if test "x$TOOLCHAIN_PATH" != x; then
19854        # We have a toolchain path, check that as well before giving up.
19855        OLD_PATH=$PATH
19856        PATH=$TOOLCHAIN_PATH:$PATH
19857        for ac_prog in gmake
19858do
19859  # Extract the first word of "$ac_prog", so it can be a program name with args.
19860set dummy $ac_prog; ac_word=$2
19861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19862$as_echo_n "checking for $ac_word... " >&6; }
19863if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19864  $as_echo_n "(cached) " >&6
19865else
19866  case $CHECK_TOOLSDIR_GMAKE in
19867  [\\/]* | ?:[\\/]*)
19868  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19869  ;;
19870  *)
19871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19872for as_dir in $PATH
19873do
19874  IFS=$as_save_IFS
19875  test -z "$as_dir" && as_dir=.
19876    for ac_exec_ext in '' $ac_executable_extensions; do
19877  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19878    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19880    break 2
19881  fi
19882done
19883  done
19884IFS=$as_save_IFS
19885
19886  ;;
19887esac
19888fi
19889CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19890if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19892$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19893else
19894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19895$as_echo "no" >&6; }
19896fi
19897
19898
19899  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19900done
19901
19902
19903  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19904  DESCRIPTION="gmake in tools-dir"
19905
19906  # On Cygwin, we require a newer version of make than on other platforms
19907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19908    MAKE_VERSION_EXPR="-e 4\."
19909    MAKE_REQUIRED_VERSION="4.0"
19910   else
19911    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19912    MAKE_REQUIRED_VERSION="3.81"
19913  fi
19914
19915  if test "x$MAKE_CANDIDATE" != x; then
19916    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19917$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19918    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19919    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19920    if test "x$IS_GNU_MAKE" = x; then
19921      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19922$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19923    else
19924      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19925      if test "x$IS_MODERN_MAKE" = x; then
19926        { $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
19927$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;}
19928      else
19929        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19930          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19931            MAKE_EXPECTED_ENV='cygwin'
19932          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19933            MAKE_EXPECTED_ENV='msys'
19934          else
19935            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19936          fi
19937          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19938          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19939        else
19940          # Not relevant for non-Windows
19941          IS_MAKE_CORRECT_ENV=true
19942        fi
19943        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19944          { $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
19945$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;}
19946        else
19947          FOUND_MAKE=$MAKE_CANDIDATE
19948
19949  # Only process if variable expands to non-empty
19950
19951  if test "x$FOUND_MAKE" != x; then
19952    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19953
19954  # First separate the path from the arguments. This will split at the first
19955  # space.
19956  complete="$FOUND_MAKE"
19957  path="${complete%% *}"
19958  tmp="$complete EOL"
19959  arguments="${tmp#* }"
19960
19961  # Input might be given as Windows format, start by converting to
19962  # unix format.
19963  new_path=`$CYGPATH -u "$path"`
19964
19965  # Now try to locate executable using which
19966  new_path=`$WHICH "$new_path" 2> /dev/null`
19967  # bat and cmd files are not always considered executable in cygwin causing which
19968  # to not find them
19969  if test "x$new_path" = x \
19970      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19971      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19972    new_path=`$CYGPATH -u "$path"`
19973  fi
19974  if test "x$new_path" = x; then
19975    # Oops. Which didn't find the executable.
19976    # The splitting of arguments from the executable at a space might have been incorrect,
19977    # since paths with space are more likely in Windows. Give it another try with the whole
19978    # argument.
19979    path="$complete"
19980    arguments="EOL"
19981    new_path=`$CYGPATH -u "$path"`
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      # It's still not found. Now this is an unrecoverable error.
19992      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19993$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19994      has_space=`$ECHO "$complete" | $GREP " "`
19995      if test "x$has_space" != x; then
19996        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19997$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19998      fi
19999      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20000    fi
20001  fi
20002
20003  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20004  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20005  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20006  # "foo.exe" is OK but "foo" is an error.
20007  #
20008  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20009  # It is also a way to make sure we got the proper file name for the real test later on.
20010  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20011  if test "x$test_shortpath" = x; then
20012    # Short path failed, file does not exist as specified.
20013    # Try adding .exe or .cmd
20014    if test -f "${new_path}.exe"; then
20015      input_to_shortpath="${new_path}.exe"
20016    elif test -f "${new_path}.cmd"; then
20017      input_to_shortpath="${new_path}.cmd"
20018    else
20019      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20020$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20021      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20022$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20023      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20024    fi
20025  else
20026    input_to_shortpath="$new_path"
20027  fi
20028
20029  # Call helper function which possibly converts this using DOS-style short mode.
20030  # If so, the updated path is stored in $new_path.
20031  new_path="$input_to_shortpath"
20032
20033  input_path="$input_to_shortpath"
20034  # Check if we need to convert this using DOS-style short mode. If the path
20035  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20036  # take no chances and rewrite it.
20037  # Note: m4 eats our [], so we need to use [ and ] instead.
20038  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20039  if test "x$has_forbidden_chars" != x; then
20040    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20041    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20042    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20043    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20044      # Going to short mode and back again did indeed matter. Since short mode is
20045      # case insensitive, let's make it lowercase to improve readability.
20046      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20047      # Now convert it back to Unix-style (cygpath)
20048      input_path=`$CYGPATH -u "$shortmode_path"`
20049      new_path="$input_path"
20050    fi
20051  fi
20052
20053  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20054  if test "x$test_cygdrive_prefix" = x; then
20055    # As a simple fix, exclude /usr/bin since it's not a real path.
20056    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20057      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20058      # a path prefixed by /cygdrive for fixpath to work.
20059      new_path="$CYGWIN_ROOT_PATH$input_path"
20060    fi
20061  fi
20062
20063  # remove trailing .exe if any
20064  new_path="${new_path/%.exe/}"
20065
20066    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20067
20068  # First separate the path from the arguments. This will split at the first
20069  # space.
20070  complete="$FOUND_MAKE"
20071  path="${complete%% *}"
20072  tmp="$complete EOL"
20073  arguments="${tmp#* }"
20074
20075  # Input might be given as Windows format, start by converting to
20076  # unix format.
20077  new_path="$path"
20078
20079  windows_path="$new_path"
20080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20081    unix_path=`$CYGPATH -u "$windows_path"`
20082    new_path="$unix_path"
20083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20084    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20085    new_path="$unix_path"
20086  fi
20087
20088
20089  # Now try to locate executable using which
20090  new_path=`$WHICH "$new_path" 2> /dev/null`
20091
20092  if test "x$new_path" = x; then
20093    # Oops. Which didn't find the executable.
20094    # The splitting of arguments from the executable at a space might have been incorrect,
20095    # since paths with space are more likely in Windows. Give it another try with the whole
20096    # argument.
20097    path="$complete"
20098    arguments="EOL"
20099    new_path="$path"
20100
20101  windows_path="$new_path"
20102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20103    unix_path=`$CYGPATH -u "$windows_path"`
20104    new_path="$unix_path"
20105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20107    new_path="$unix_path"
20108  fi
20109
20110
20111    new_path=`$WHICH "$new_path" 2> /dev/null`
20112    # bat and cmd files are not always considered executable in MSYS causing which
20113    # to not find them
20114    if test "x$new_path" = x \
20115        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20116        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20117      new_path="$path"
20118
20119  windows_path="$new_path"
20120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20121    unix_path=`$CYGPATH -u "$windows_path"`
20122    new_path="$unix_path"
20123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20124    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20125    new_path="$unix_path"
20126  fi
20127
20128    fi
20129
20130    if test "x$new_path" = x; then
20131      # It's still not found. Now this is an unrecoverable error.
20132      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20133$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20134      has_space=`$ECHO "$complete" | $GREP " "`
20135      if test "x$has_space" != x; then
20136        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20137$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20138      fi
20139      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20140    fi
20141  fi
20142
20143  # Now new_path has a complete unix path to the binary
20144  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20145    # Keep paths in /bin as-is, but remove trailing .exe if any
20146    new_path="${new_path/%.exe/}"
20147    # Do not save /bin paths to all_fixpath_prefixes!
20148  else
20149    # Not in mixed or Windows style, start by that.
20150    new_path=`cmd //c echo $new_path`
20151
20152  input_path="$new_path"
20153  # Check if we need to convert this using DOS-style short mode. If the path
20154  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20155  # take no chances and rewrite it.
20156  # Note: m4 eats our [], so we need to use [ and ] instead.
20157  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20158  if test "x$has_forbidden_chars" != x; then
20159    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20160    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20161  fi
20162
20163    # Output is in $new_path
20164
20165  windows_path="$new_path"
20166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20167    unix_path=`$CYGPATH -u "$windows_path"`
20168    new_path="$unix_path"
20169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20171    new_path="$unix_path"
20172  fi
20173
20174    # remove trailing .exe if any
20175    new_path="${new_path/%.exe/}"
20176
20177    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20178    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20179  fi
20180
20181    else
20182      # We're on a unix platform. Hooray! :)
20183      # First separate the path from the arguments. This will split at the first
20184      # space.
20185      complete="$FOUND_MAKE"
20186      path="${complete%% *}"
20187      tmp="$complete EOL"
20188      arguments="${tmp#* }"
20189
20190      # Cannot rely on the command "which" here since it doesn't always work.
20191      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20192      if test -z "$is_absolute_path"; then
20193        # Path to executable is not absolute. Find it.
20194        IFS_save="$IFS"
20195        IFS=:
20196        for p in $PATH; do
20197          if test -f "$p/$path" && test -x "$p/$path"; then
20198            new_path="$p/$path"
20199            break
20200          fi
20201        done
20202        IFS="$IFS_save"
20203      else
20204        # This is an absolute path, we can use it without further modifications.
20205        new_path="$path"
20206      fi
20207
20208      if test "x$new_path" = x; then
20209        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20210$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20211        has_space=`$ECHO "$complete" | $GREP " "`
20212        if test "x$has_space" != x; then
20213          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20214$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20215        fi
20216        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20217      fi
20218    fi
20219
20220    # Now join together the path and the arguments once again
20221    if test "x$arguments" != xEOL; then
20222      new_complete="$new_path ${arguments% *}"
20223    else
20224      new_complete="$new_path"
20225    fi
20226
20227    if test "x$complete" != "x$new_complete"; then
20228      FOUND_MAKE="$new_complete"
20229      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20230$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20231    fi
20232  fi
20233
20234        fi
20235      fi
20236    fi
20237  fi
20238
20239        if test "x$FOUND_MAKE" = x; then
20240          for ac_prog in make
20241do
20242  # Extract the first word of "$ac_prog", so it can be a program name with args.
20243set dummy $ac_prog; ac_word=$2
20244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20245$as_echo_n "checking for $ac_word... " >&6; }
20246if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20247  $as_echo_n "(cached) " >&6
20248else
20249  case $CHECK_TOOLSDIR_MAKE in
20250  [\\/]* | ?:[\\/]*)
20251  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20252  ;;
20253  *)
20254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20255for as_dir in $PATH
20256do
20257  IFS=$as_save_IFS
20258  test -z "$as_dir" && as_dir=.
20259    for ac_exec_ext in '' $ac_executable_extensions; do
20260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20261    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20263    break 2
20264  fi
20265done
20266  done
20267IFS=$as_save_IFS
20268
20269  ;;
20270esac
20271fi
20272CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20273if test -n "$CHECK_TOOLSDIR_MAKE"; then
20274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20275$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20276else
20277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20278$as_echo "no" >&6; }
20279fi
20280
20281
20282  test -n "$CHECK_TOOLSDIR_MAKE" && break
20283done
20284
20285
20286  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20287  DESCRIPTION="make in tools-dir"
20288
20289  # On Cygwin, we require a newer version of make than on other platforms
20290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20291    MAKE_VERSION_EXPR="-e 4\."
20292    MAKE_REQUIRED_VERSION="4.0"
20293   else
20294    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20295    MAKE_REQUIRED_VERSION="3.81"
20296  fi
20297
20298  if test "x$MAKE_CANDIDATE" != x; then
20299    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20300$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20301    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20302    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20303    if test "x$IS_GNU_MAKE" = x; then
20304      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20305$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20306    else
20307      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20308      if test "x$IS_MODERN_MAKE" = x; then
20309        { $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
20310$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;}
20311      else
20312        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20313          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20314            MAKE_EXPECTED_ENV='cygwin'
20315          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20316            MAKE_EXPECTED_ENV='msys'
20317          else
20318            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20319          fi
20320          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20321          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20322        else
20323          # Not relevant for non-Windows
20324          IS_MAKE_CORRECT_ENV=true
20325        fi
20326        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20327          { $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
20328$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;}
20329        else
20330          FOUND_MAKE=$MAKE_CANDIDATE
20331
20332  # Only process if variable expands to non-empty
20333
20334  if test "x$FOUND_MAKE" != x; then
20335    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20336
20337  # First separate the path from the arguments. This will split at the first
20338  # space.
20339  complete="$FOUND_MAKE"
20340  path="${complete%% *}"
20341  tmp="$complete EOL"
20342  arguments="${tmp#* }"
20343
20344  # Input might be given as Windows format, start by converting to
20345  # unix format.
20346  new_path=`$CYGPATH -u "$path"`
20347
20348  # Now try to locate executable using which
20349  new_path=`$WHICH "$new_path" 2> /dev/null`
20350  # bat and cmd files are not always considered executable in cygwin causing which
20351  # to not find them
20352  if test "x$new_path" = x \
20353      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20354      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20355    new_path=`$CYGPATH -u "$path"`
20356  fi
20357  if test "x$new_path" = x; then
20358    # Oops. Which didn't find the executable.
20359    # The splitting of arguments from the executable at a space might have been incorrect,
20360    # since paths with space are more likely in Windows. Give it another try with the whole
20361    # argument.
20362    path="$complete"
20363    arguments="EOL"
20364    new_path=`$CYGPATH -u "$path"`
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      # It's still not found. Now this is an unrecoverable error.
20375      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20376$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20377      has_space=`$ECHO "$complete" | $GREP " "`
20378      if test "x$has_space" != x; then
20379        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20380$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20381      fi
20382      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20383    fi
20384  fi
20385
20386  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20387  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20388  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20389  # "foo.exe" is OK but "foo" is an error.
20390  #
20391  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20392  # It is also a way to make sure we got the proper file name for the real test later on.
20393  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20394  if test "x$test_shortpath" = x; then
20395    # Short path failed, file does not exist as specified.
20396    # Try adding .exe or .cmd
20397    if test -f "${new_path}.exe"; then
20398      input_to_shortpath="${new_path}.exe"
20399    elif test -f "${new_path}.cmd"; then
20400      input_to_shortpath="${new_path}.cmd"
20401    else
20402      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20403$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20404      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20405$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20406      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20407    fi
20408  else
20409    input_to_shortpath="$new_path"
20410  fi
20411
20412  # Call helper function which possibly converts this using DOS-style short mode.
20413  # If so, the updated path is stored in $new_path.
20414  new_path="$input_to_shortpath"
20415
20416  input_path="$input_to_shortpath"
20417  # Check if we need to convert this using DOS-style short mode. If the path
20418  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20419  # take no chances and rewrite it.
20420  # Note: m4 eats our [], so we need to use [ and ] instead.
20421  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20422  if test "x$has_forbidden_chars" != x; then
20423    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20424    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20425    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20426    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20427      # Going to short mode and back again did indeed matter. Since short mode is
20428      # case insensitive, let's make it lowercase to improve readability.
20429      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20430      # Now convert it back to Unix-style (cygpath)
20431      input_path=`$CYGPATH -u "$shortmode_path"`
20432      new_path="$input_path"
20433    fi
20434  fi
20435
20436  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20437  if test "x$test_cygdrive_prefix" = x; then
20438    # As a simple fix, exclude /usr/bin since it's not a real path.
20439    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20440      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20441      # a path prefixed by /cygdrive for fixpath to work.
20442      new_path="$CYGWIN_ROOT_PATH$input_path"
20443    fi
20444  fi
20445
20446  # remove trailing .exe if any
20447  new_path="${new_path/%.exe/}"
20448
20449    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20450
20451  # First separate the path from the arguments. This will split at the first
20452  # space.
20453  complete="$FOUND_MAKE"
20454  path="${complete%% *}"
20455  tmp="$complete EOL"
20456  arguments="${tmp#* }"
20457
20458  # Input might be given as Windows format, start by converting to
20459  # unix format.
20460  new_path="$path"
20461
20462  windows_path="$new_path"
20463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20464    unix_path=`$CYGPATH -u "$windows_path"`
20465    new_path="$unix_path"
20466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20467    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20468    new_path="$unix_path"
20469  fi
20470
20471
20472  # Now try to locate executable using which
20473  new_path=`$WHICH "$new_path" 2> /dev/null`
20474
20475  if test "x$new_path" = x; then
20476    # Oops. Which didn't find the executable.
20477    # The splitting of arguments from the executable at a space might have been incorrect,
20478    # since paths with space are more likely in Windows. Give it another try with the whole
20479    # argument.
20480    path="$complete"
20481    arguments="EOL"
20482    new_path="$path"
20483
20484  windows_path="$new_path"
20485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20486    unix_path=`$CYGPATH -u "$windows_path"`
20487    new_path="$unix_path"
20488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20490    new_path="$unix_path"
20491  fi
20492
20493
20494    new_path=`$WHICH "$new_path" 2> /dev/null`
20495    # bat and cmd files are not always considered executable in MSYS causing which
20496    # to not find them
20497    if test "x$new_path" = x \
20498        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20499        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20500      new_path="$path"
20501
20502  windows_path="$new_path"
20503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20504    unix_path=`$CYGPATH -u "$windows_path"`
20505    new_path="$unix_path"
20506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20507    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20508    new_path="$unix_path"
20509  fi
20510
20511    fi
20512
20513    if test "x$new_path" = x; then
20514      # It's still not found. Now this is an unrecoverable error.
20515      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20516$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20517      has_space=`$ECHO "$complete" | $GREP " "`
20518      if test "x$has_space" != x; then
20519        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20520$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20521      fi
20522      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20523    fi
20524  fi
20525
20526  # Now new_path has a complete unix path to the binary
20527  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20528    # Keep paths in /bin as-is, but remove trailing .exe if any
20529    new_path="${new_path/%.exe/}"
20530    # Do not save /bin paths to all_fixpath_prefixes!
20531  else
20532    # Not in mixed or Windows style, start by that.
20533    new_path=`cmd //c echo $new_path`
20534
20535  input_path="$new_path"
20536  # Check if we need to convert this using DOS-style short mode. If the path
20537  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20538  # take no chances and rewrite it.
20539  # Note: m4 eats our [], so we need to use [ and ] instead.
20540  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20541  if test "x$has_forbidden_chars" != x; then
20542    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20543    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20544  fi
20545
20546    # Output is in $new_path
20547
20548  windows_path="$new_path"
20549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20550    unix_path=`$CYGPATH -u "$windows_path"`
20551    new_path="$unix_path"
20552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20553    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20554    new_path="$unix_path"
20555  fi
20556
20557    # remove trailing .exe if any
20558    new_path="${new_path/%.exe/}"
20559
20560    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20561    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20562  fi
20563
20564    else
20565      # We're on a unix platform. Hooray! :)
20566      # First separate the path from the arguments. This will split at the first
20567      # space.
20568      complete="$FOUND_MAKE"
20569      path="${complete%% *}"
20570      tmp="$complete EOL"
20571      arguments="${tmp#* }"
20572
20573      # Cannot rely on the command "which" here since it doesn't always work.
20574      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20575      if test -z "$is_absolute_path"; then
20576        # Path to executable is not absolute. Find it.
20577        IFS_save="$IFS"
20578        IFS=:
20579        for p in $PATH; do
20580          if test -f "$p/$path" && test -x "$p/$path"; then
20581            new_path="$p/$path"
20582            break
20583          fi
20584        done
20585        IFS="$IFS_save"
20586      else
20587        # This is an absolute path, we can use it without further modifications.
20588        new_path="$path"
20589      fi
20590
20591      if test "x$new_path" = x; then
20592        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20593$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20594        has_space=`$ECHO "$complete" | $GREP " "`
20595        if test "x$has_space" != x; then
20596          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20597$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20598        fi
20599        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20600      fi
20601    fi
20602
20603    # Now join together the path and the arguments once again
20604    if test "x$arguments" != xEOL; then
20605      new_complete="$new_path ${arguments% *}"
20606    else
20607      new_complete="$new_path"
20608    fi
20609
20610    if test "x$complete" != "x$new_complete"; then
20611      FOUND_MAKE="$new_complete"
20612      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20613$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20614    fi
20615  fi
20616
20617        fi
20618      fi
20619    fi
20620  fi
20621
20622        fi
20623        PATH=$OLD_PATH
20624      fi
20625    fi
20626
20627    if test "x$FOUND_MAKE" = x; then
20628      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
20629    fi
20630
20631    else
20632      # If it succeeded, then it was overridden by the user. We will use it
20633      # for the tool.
20634
20635      # First remove it from the list of overridden variables, so we can test
20636      # for unknown variables in the end.
20637      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20638
20639      # Check if we try to supply an empty value
20640      if test "x$MAKE" = x; then
20641        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20642$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20643        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20644$as_echo_n "checking for MAKE... " >&6; }
20645        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20646$as_echo "disabled" >&6; }
20647      else
20648        # Check if the provided tool contains a complete path.
20649        tool_specified="$MAKE"
20650        tool_basename="${tool_specified##*/}"
20651        if test "x$tool_basename" = "x$tool_specified"; then
20652          # A command without a complete path is provided, search $PATH.
20653          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20654$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20655          # Extract the first word of "$tool_basename", so it can be a program name with args.
20656set dummy $tool_basename; ac_word=$2
20657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20658$as_echo_n "checking for $ac_word... " >&6; }
20659if ${ac_cv_path_MAKE+:} false; then :
20660  $as_echo_n "(cached) " >&6
20661else
20662  case $MAKE in
20663  [\\/]* | ?:[\\/]*)
20664  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20665  ;;
20666  *)
20667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20668for as_dir in $PATH
20669do
20670  IFS=$as_save_IFS
20671  test -z "$as_dir" && as_dir=.
20672    for ac_exec_ext in '' $ac_executable_extensions; do
20673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20674    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20676    break 2
20677  fi
20678done
20679  done
20680IFS=$as_save_IFS
20681
20682  ;;
20683esac
20684fi
20685MAKE=$ac_cv_path_MAKE
20686if test -n "$MAKE"; then
20687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20688$as_echo "$MAKE" >&6; }
20689else
20690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20691$as_echo "no" >&6; }
20692fi
20693
20694
20695          if test "x$MAKE" = x; then
20696            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20697          fi
20698        else
20699          # Otherwise we believe it is a complete path. Use it as it is.
20700          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20701$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20702          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20703$as_echo_n "checking for MAKE... " >&6; }
20704          if test ! -x "$tool_specified"; then
20705            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20706$as_echo "not found" >&6; }
20707            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20708          fi
20709          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20710$as_echo "$tool_specified" >&6; }
20711        fi
20712      fi
20713    fi
20714
20715    # If MAKE was set by user, verify the version
20716
20717  MAKE_CANDIDATE=""$MAKE""
20718  DESCRIPTION="user supplied MAKE=$MAKE"
20719
20720  # On Cygwin, we require a newer version of make than on other platforms
20721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20722    MAKE_VERSION_EXPR="-e 4\."
20723    MAKE_REQUIRED_VERSION="4.0"
20724   else
20725    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20726    MAKE_REQUIRED_VERSION="3.81"
20727  fi
20728
20729  if test "x$MAKE_CANDIDATE" != x; then
20730    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20731$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20732    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20733    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20734    if test "x$IS_GNU_MAKE" = x; then
20735      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20736$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20737    else
20738      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20739      if test "x$IS_MODERN_MAKE" = x; then
20740        { $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
20741$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;}
20742      else
20743        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20744          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20745            MAKE_EXPECTED_ENV='cygwin'
20746          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20747            MAKE_EXPECTED_ENV='msys'
20748          else
20749            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20750          fi
20751          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20752          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20753        else
20754          # Not relevant for non-Windows
20755          IS_MAKE_CORRECT_ENV=true
20756        fi
20757        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20758          { $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
20759$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;}
20760        else
20761          FOUND_MAKE=$MAKE_CANDIDATE
20762
20763  # Only process if variable expands to non-empty
20764
20765  if test "x$FOUND_MAKE" != x; then
20766    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20767
20768  # First separate the path from the arguments. This will split at the first
20769  # space.
20770  complete="$FOUND_MAKE"
20771  path="${complete%% *}"
20772  tmp="$complete EOL"
20773  arguments="${tmp#* }"
20774
20775  # Input might be given as Windows format, start by converting to
20776  # unix format.
20777  new_path=`$CYGPATH -u "$path"`
20778
20779  # Now try to locate executable using which
20780  new_path=`$WHICH "$new_path" 2> /dev/null`
20781  # bat and cmd files are not always considered executable in cygwin causing which
20782  # to not find them
20783  if test "x$new_path" = x \
20784      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20785      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20786    new_path=`$CYGPATH -u "$path"`
20787  fi
20788  if test "x$new_path" = x; then
20789    # Oops. Which didn't find the executable.
20790    # The splitting of arguments from the executable at a space might have been incorrect,
20791    # since paths with space are more likely in Windows. Give it another try with the whole
20792    # argument.
20793    path="$complete"
20794    arguments="EOL"
20795    new_path=`$CYGPATH -u "$path"`
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      # It's still not found. Now this is an unrecoverable error.
20806      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20807$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20808      has_space=`$ECHO "$complete" | $GREP " "`
20809      if test "x$has_space" != x; then
20810        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20811$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20812      fi
20813      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20814    fi
20815  fi
20816
20817  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20818  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20819  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20820  # "foo.exe" is OK but "foo" is an error.
20821  #
20822  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20823  # It is also a way to make sure we got the proper file name for the real test later on.
20824  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20825  if test "x$test_shortpath" = x; then
20826    # Short path failed, file does not exist as specified.
20827    # Try adding .exe or .cmd
20828    if test -f "${new_path}.exe"; then
20829      input_to_shortpath="${new_path}.exe"
20830    elif test -f "${new_path}.cmd"; then
20831      input_to_shortpath="${new_path}.cmd"
20832    else
20833      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20834$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20835      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20836$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20837      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20838    fi
20839  else
20840    input_to_shortpath="$new_path"
20841  fi
20842
20843  # Call helper function which possibly converts this using DOS-style short mode.
20844  # If so, the updated path is stored in $new_path.
20845  new_path="$input_to_shortpath"
20846
20847  input_path="$input_to_shortpath"
20848  # Check if we need to convert this using DOS-style short mode. If the path
20849  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20850  # take no chances and rewrite it.
20851  # Note: m4 eats our [], so we need to use [ and ] instead.
20852  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20853  if test "x$has_forbidden_chars" != x; then
20854    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20855    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20856    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20857    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20858      # Going to short mode and back again did indeed matter. Since short mode is
20859      # case insensitive, let's make it lowercase to improve readability.
20860      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20861      # Now convert it back to Unix-style (cygpath)
20862      input_path=`$CYGPATH -u "$shortmode_path"`
20863      new_path="$input_path"
20864    fi
20865  fi
20866
20867  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20868  if test "x$test_cygdrive_prefix" = x; then
20869    # As a simple fix, exclude /usr/bin since it's not a real path.
20870    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20871      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20872      # a path prefixed by /cygdrive for fixpath to work.
20873      new_path="$CYGWIN_ROOT_PATH$input_path"
20874    fi
20875  fi
20876
20877  # remove trailing .exe if any
20878  new_path="${new_path/%.exe/}"
20879
20880    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20881
20882  # First separate the path from the arguments. This will split at the first
20883  # space.
20884  complete="$FOUND_MAKE"
20885  path="${complete%% *}"
20886  tmp="$complete EOL"
20887  arguments="${tmp#* }"
20888
20889  # Input might be given as Windows format, start by converting to
20890  # unix format.
20891  new_path="$path"
20892
20893  windows_path="$new_path"
20894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20895    unix_path=`$CYGPATH -u "$windows_path"`
20896    new_path="$unix_path"
20897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20899    new_path="$unix_path"
20900  fi
20901
20902
20903  # Now try to locate executable using which
20904  new_path=`$WHICH "$new_path" 2> /dev/null`
20905
20906  if test "x$new_path" = x; then
20907    # Oops. Which didn't find the executable.
20908    # The splitting of arguments from the executable at a space might have been incorrect,
20909    # since paths with space are more likely in Windows. Give it another try with the whole
20910    # argument.
20911    path="$complete"
20912    arguments="EOL"
20913    new_path="$path"
20914
20915  windows_path="$new_path"
20916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20917    unix_path=`$CYGPATH -u "$windows_path"`
20918    new_path="$unix_path"
20919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20921    new_path="$unix_path"
20922  fi
20923
20924
20925    new_path=`$WHICH "$new_path" 2> /dev/null`
20926    # bat and cmd files are not always considered executable in MSYS causing which
20927    # to not find them
20928    if test "x$new_path" = x \
20929        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20930        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20931      new_path="$path"
20932
20933  windows_path="$new_path"
20934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20935    unix_path=`$CYGPATH -u "$windows_path"`
20936    new_path="$unix_path"
20937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20939    new_path="$unix_path"
20940  fi
20941
20942    fi
20943
20944    if test "x$new_path" = x; then
20945      # It's still not found. Now this is an unrecoverable error.
20946      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20947$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20948      has_space=`$ECHO "$complete" | $GREP " "`
20949      if test "x$has_space" != x; then
20950        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20951$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20952      fi
20953      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20954    fi
20955  fi
20956
20957  # Now new_path has a complete unix path to the binary
20958  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20959    # Keep paths in /bin as-is, but remove trailing .exe if any
20960    new_path="${new_path/%.exe/}"
20961    # Do not save /bin paths to all_fixpath_prefixes!
20962  else
20963    # Not in mixed or Windows style, start by that.
20964    new_path=`cmd //c echo $new_path`
20965
20966  input_path="$new_path"
20967  # Check if we need to convert this using DOS-style short mode. If the path
20968  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20969  # take no chances and rewrite it.
20970  # Note: m4 eats our [], so we need to use [ and ] instead.
20971  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20972  if test "x$has_forbidden_chars" != x; then
20973    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20974    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20975  fi
20976
20977    # Output is in $new_path
20978
20979  windows_path="$new_path"
20980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20981    unix_path=`$CYGPATH -u "$windows_path"`
20982    new_path="$unix_path"
20983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20985    new_path="$unix_path"
20986  fi
20987
20988    # remove trailing .exe if any
20989    new_path="${new_path/%.exe/}"
20990
20991    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20992    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20993  fi
20994
20995    else
20996      # We're on a unix platform. Hooray! :)
20997      # First separate the path from the arguments. This will split at the first
20998      # space.
20999      complete="$FOUND_MAKE"
21000      path="${complete%% *}"
21001      tmp="$complete EOL"
21002      arguments="${tmp#* }"
21003
21004      # Cannot rely on the command "which" here since it doesn't always work.
21005      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21006      if test -z "$is_absolute_path"; then
21007        # Path to executable is not absolute. Find it.
21008        IFS_save="$IFS"
21009        IFS=:
21010        for p in $PATH; do
21011          if test -f "$p/$path" && test -x "$p/$path"; then
21012            new_path="$p/$path"
21013            break
21014          fi
21015        done
21016        IFS="$IFS_save"
21017      else
21018        # This is an absolute path, we can use it without further modifications.
21019        new_path="$path"
21020      fi
21021
21022      if test "x$new_path" = x; then
21023        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21024$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21025        has_space=`$ECHO "$complete" | $GREP " "`
21026        if test "x$has_space" != x; then
21027          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21028$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21029        fi
21030        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21031      fi
21032    fi
21033
21034    # Now join together the path and the arguments once again
21035    if test "x$arguments" != xEOL; then
21036      new_complete="$new_path ${arguments% *}"
21037    else
21038      new_complete="$new_path"
21039    fi
21040
21041    if test "x$complete" != "x$new_complete"; then
21042      FOUND_MAKE="$new_complete"
21043      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21044$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21045    fi
21046  fi
21047
21048        fi
21049      fi
21050    fi
21051  fi
21052
21053    if test "x$FOUND_MAKE" = x; then
21054      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21055    fi
21056
21057  fi
21058
21059
21060  MAKE=$FOUND_MAKE
21061
21062  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21063$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21064
21065
21066  # Check if make supports the output sync option and if so, setup using it.
21067  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21068$as_echo_n "checking if make --output-sync is supported... " >&6; }
21069  if $MAKE --version -O > /dev/null 2>&1; then
21070    OUTPUT_SYNC_SUPPORTED=true
21071    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21072$as_echo "yes" >&6; }
21073    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21074$as_echo_n "checking for output-sync value... " >&6; }
21075
21076# Check whether --with-output-sync was given.
21077if test "${with_output_sync+set}" = set; then :
21078  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21079fi
21080
21081    if test "x$OUTPUT_SYNC" = "x"; then
21082      OUTPUT_SYNC=none
21083    fi
21084    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21085$as_echo "$OUTPUT_SYNC" >&6; }
21086    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21087      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21088    fi
21089  else
21090    OUTPUT_SYNC_SUPPORTED=false
21091    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21092$as_echo "no" >&6; }
21093  fi
21094
21095
21096
21097
21098
21099
21100  # Test if find supports -delete
21101  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21102$as_echo_n "checking if find supports -delete... " >&6; }
21103  FIND_DELETE="-delete"
21104
21105  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21106
21107  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21108
21109  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21110  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21111    # No, it does not.
21112    $RM $DELETEDIR/TestIfFindSupportsDelete
21113    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21114      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21115      FIND_DELETE="-print | $XARGS $RM"
21116    else
21117      FIND_DELETE="-exec $RM \{\} \+"
21118    fi
21119    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21120$as_echo "no" >&6; }
21121  else
21122    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21123$as_echo "yes" >&6; }
21124  fi
21125  $RMDIR $DELETEDIR
21126
21127
21128
21129  # Test which kind of tar was found
21130  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21131    TAR_TYPE="gnu"
21132  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21133    TAR_TYPE="bsd"
21134  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21135    TAR_TYPE="solaris"
21136  fi
21137  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21138$as_echo_n "checking what type of tar was found... " >&6; }
21139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21140$as_echo "$TAR_TYPE" >&6; }
21141
21142  TAR_CREATE_FILE_PARAM=""
21143
21144  if test "x$TAR_TYPE" = "xgnu"; then
21145    TAR_INCLUDE_PARAM="T"
21146    TAR_SUPPORTS_TRANSFORM="true"
21147    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21148      # When using gnu tar for Solaris targets, need to use compatibility mode
21149      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21150    fi
21151  else
21152    TAR_INCLUDE_PARAM="I"
21153    TAR_SUPPORTS_TRANSFORM="false"
21154  fi
21155
21156
21157
21158
21159
21160
21161  # These tools might not be installed by default,
21162  # need hint on how to install them.
21163
21164
21165
21166  # Publish this variable in the help.
21167
21168
21169  if [ -z "${UNZIP+x}" ]; then
21170    # The variable is not set by user, try to locate tool using the code snippet
21171    for ac_prog in unzip
21172do
21173  # Extract the first word of "$ac_prog", so it can be a program name with args.
21174set dummy $ac_prog; ac_word=$2
21175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21176$as_echo_n "checking for $ac_word... " >&6; }
21177if ${ac_cv_path_UNZIP+:} false; then :
21178  $as_echo_n "(cached) " >&6
21179else
21180  case $UNZIP in
21181  [\\/]* | ?:[\\/]*)
21182  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21183  ;;
21184  *)
21185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21186for as_dir in $PATH
21187do
21188  IFS=$as_save_IFS
21189  test -z "$as_dir" && as_dir=.
21190    for ac_exec_ext in '' $ac_executable_extensions; do
21191  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21192    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21194    break 2
21195  fi
21196done
21197  done
21198IFS=$as_save_IFS
21199
21200  ;;
21201esac
21202fi
21203UNZIP=$ac_cv_path_UNZIP
21204if test -n "$UNZIP"; then
21205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21206$as_echo "$UNZIP" >&6; }
21207else
21208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21209$as_echo "no" >&6; }
21210fi
21211
21212
21213  test -n "$UNZIP" && break
21214done
21215
21216  else
21217    # The variable is set, but is it from the command line or the environment?
21218
21219    # Try to remove the string !UNZIP! from our list.
21220    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21221    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21222      # If it failed, the variable was not from the command line. Ignore it,
21223      # but warn the user (except for BASH, which is always set by the calling BASH).
21224      if test "xUNZIP" != xBASH; then
21225        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21226$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21227      fi
21228      # Try to locate tool using the code snippet
21229      for ac_prog in unzip
21230do
21231  # Extract the first word of "$ac_prog", so it can be a program name with args.
21232set dummy $ac_prog; ac_word=$2
21233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21234$as_echo_n "checking for $ac_word... " >&6; }
21235if ${ac_cv_path_UNZIP+:} false; then :
21236  $as_echo_n "(cached) " >&6
21237else
21238  case $UNZIP in
21239  [\\/]* | ?:[\\/]*)
21240  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21241  ;;
21242  *)
21243  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21244for as_dir in $PATH
21245do
21246  IFS=$as_save_IFS
21247  test -z "$as_dir" && as_dir=.
21248    for ac_exec_ext in '' $ac_executable_extensions; do
21249  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21250    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21251    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21252    break 2
21253  fi
21254done
21255  done
21256IFS=$as_save_IFS
21257
21258  ;;
21259esac
21260fi
21261UNZIP=$ac_cv_path_UNZIP
21262if test -n "$UNZIP"; then
21263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21264$as_echo "$UNZIP" >&6; }
21265else
21266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21267$as_echo "no" >&6; }
21268fi
21269
21270
21271  test -n "$UNZIP" && break
21272done
21273
21274    else
21275      # If it succeeded, then it was overridden by the user. We will use it
21276      # for the tool.
21277
21278      # First remove it from the list of overridden variables, so we can test
21279      # for unknown variables in the end.
21280      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21281
21282      # Check if we try to supply an empty value
21283      if test "x$UNZIP" = x; then
21284        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21285$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21286        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21287$as_echo_n "checking for UNZIP... " >&6; }
21288        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21289$as_echo "disabled" >&6; }
21290      else
21291        # Check if the provided tool contains a complete path.
21292        tool_specified="$UNZIP"
21293        tool_basename="${tool_specified##*/}"
21294        if test "x$tool_basename" = "x$tool_specified"; then
21295          # A command without a complete path is provided, search $PATH.
21296          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21297$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21298          # Extract the first word of "$tool_basename", so it can be a program name with args.
21299set dummy $tool_basename; ac_word=$2
21300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21301$as_echo_n "checking for $ac_word... " >&6; }
21302if ${ac_cv_path_UNZIP+:} false; then :
21303  $as_echo_n "(cached) " >&6
21304else
21305  case $UNZIP in
21306  [\\/]* | ?:[\\/]*)
21307  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21308  ;;
21309  *)
21310  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21311for as_dir in $PATH
21312do
21313  IFS=$as_save_IFS
21314  test -z "$as_dir" && as_dir=.
21315    for ac_exec_ext in '' $ac_executable_extensions; do
21316  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21317    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21319    break 2
21320  fi
21321done
21322  done
21323IFS=$as_save_IFS
21324
21325  ;;
21326esac
21327fi
21328UNZIP=$ac_cv_path_UNZIP
21329if test -n "$UNZIP"; then
21330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21331$as_echo "$UNZIP" >&6; }
21332else
21333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21334$as_echo "no" >&6; }
21335fi
21336
21337
21338          if test "x$UNZIP" = x; then
21339            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21340          fi
21341        else
21342          # Otherwise we believe it is a complete path. Use it as it is.
21343          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21344$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21345          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21346$as_echo_n "checking for UNZIP... " >&6; }
21347          if test ! -x "$tool_specified"; then
21348            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21349$as_echo "not found" >&6; }
21350            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21351          fi
21352          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21353$as_echo "$tool_specified" >&6; }
21354        fi
21355      fi
21356    fi
21357
21358  fi
21359
21360
21361
21362  if test "x$UNZIP" = x; then
21363    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21364  fi
21365
21366
21367  # Since zip uses "ZIP" as a environment variable for passing options, we need
21368  # to name our variable differently, hence ZIPEXE.
21369
21370
21371
21372  # Publish this variable in the help.
21373
21374
21375  if [ -z "${ZIPEXE+x}" ]; then
21376    # The variable is not set by user, try to locate tool using the code snippet
21377    for ac_prog in zip
21378do
21379  # Extract the first word of "$ac_prog", so it can be a program name with args.
21380set dummy $ac_prog; ac_word=$2
21381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21382$as_echo_n "checking for $ac_word... " >&6; }
21383if ${ac_cv_path_ZIPEXE+:} false; then :
21384  $as_echo_n "(cached) " >&6
21385else
21386  case $ZIPEXE in
21387  [\\/]* | ?:[\\/]*)
21388  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21389  ;;
21390  *)
21391  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21392for as_dir in $PATH
21393do
21394  IFS=$as_save_IFS
21395  test -z "$as_dir" && as_dir=.
21396    for ac_exec_ext in '' $ac_executable_extensions; do
21397  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21398    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21400    break 2
21401  fi
21402done
21403  done
21404IFS=$as_save_IFS
21405
21406  ;;
21407esac
21408fi
21409ZIPEXE=$ac_cv_path_ZIPEXE
21410if test -n "$ZIPEXE"; then
21411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21412$as_echo "$ZIPEXE" >&6; }
21413else
21414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21415$as_echo "no" >&6; }
21416fi
21417
21418
21419  test -n "$ZIPEXE" && break
21420done
21421
21422  else
21423    # The variable is set, but is it from the command line or the environment?
21424
21425    # Try to remove the string !ZIPEXE! from our list.
21426    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21427    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21428      # If it failed, the variable was not from the command line. Ignore it,
21429      # but warn the user (except for BASH, which is always set by the calling BASH).
21430      if test "xZIPEXE" != xBASH; then
21431        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21432$as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21433      fi
21434      # Try to locate tool using the code snippet
21435      for ac_prog in zip
21436do
21437  # Extract the first word of "$ac_prog", so it can be a program name with args.
21438set dummy $ac_prog; ac_word=$2
21439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21440$as_echo_n "checking for $ac_word... " >&6; }
21441if ${ac_cv_path_ZIPEXE+:} false; then :
21442  $as_echo_n "(cached) " >&6
21443else
21444  case $ZIPEXE in
21445  [\\/]* | ?:[\\/]*)
21446  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21447  ;;
21448  *)
21449  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21450for as_dir in $PATH
21451do
21452  IFS=$as_save_IFS
21453  test -z "$as_dir" && as_dir=.
21454    for ac_exec_ext in '' $ac_executable_extensions; do
21455  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21456    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21457    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21458    break 2
21459  fi
21460done
21461  done
21462IFS=$as_save_IFS
21463
21464  ;;
21465esac
21466fi
21467ZIPEXE=$ac_cv_path_ZIPEXE
21468if test -n "$ZIPEXE"; then
21469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21470$as_echo "$ZIPEXE" >&6; }
21471else
21472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21473$as_echo "no" >&6; }
21474fi
21475
21476
21477  test -n "$ZIPEXE" && break
21478done
21479
21480    else
21481      # If it succeeded, then it was overridden by the user. We will use it
21482      # for the tool.
21483
21484      # First remove it from the list of overridden variables, so we can test
21485      # for unknown variables in the end.
21486      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21487
21488      # Check if we try to supply an empty value
21489      if test "x$ZIPEXE" = x; then
21490        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21491$as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21492        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21493$as_echo_n "checking for ZIPEXE... " >&6; }
21494        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21495$as_echo "disabled" >&6; }
21496      else
21497        # Check if the provided tool contains a complete path.
21498        tool_specified="$ZIPEXE"
21499        tool_basename="${tool_specified##*/}"
21500        if test "x$tool_basename" = "x$tool_specified"; then
21501          # A command without a complete path is provided, search $PATH.
21502          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21503$as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21504          # Extract the first word of "$tool_basename", so it can be a program name with args.
21505set dummy $tool_basename; ac_word=$2
21506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21507$as_echo_n "checking for $ac_word... " >&6; }
21508if ${ac_cv_path_ZIPEXE+:} false; then :
21509  $as_echo_n "(cached) " >&6
21510else
21511  case $ZIPEXE in
21512  [\\/]* | ?:[\\/]*)
21513  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21514  ;;
21515  *)
21516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21517for as_dir in $PATH
21518do
21519  IFS=$as_save_IFS
21520  test -z "$as_dir" && as_dir=.
21521    for ac_exec_ext in '' $ac_executable_extensions; do
21522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21523    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21525    break 2
21526  fi
21527done
21528  done
21529IFS=$as_save_IFS
21530
21531  ;;
21532esac
21533fi
21534ZIPEXE=$ac_cv_path_ZIPEXE
21535if test -n "$ZIPEXE"; then
21536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21537$as_echo "$ZIPEXE" >&6; }
21538else
21539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21540$as_echo "no" >&6; }
21541fi
21542
21543
21544          if test "x$ZIPEXE" = x; then
21545            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21546          fi
21547        else
21548          # Otherwise we believe it is a complete path. Use it as it is.
21549          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21550$as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21551          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21552$as_echo_n "checking for ZIPEXE... " >&6; }
21553          if test ! -x "$tool_specified"; then
21554            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21555$as_echo "not found" >&6; }
21556            as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21557          fi
21558          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21559$as_echo "$tool_specified" >&6; }
21560        fi
21561      fi
21562    fi
21563
21564  fi
21565
21566
21567
21568  if test "x$ZIPEXE" = x; then
21569    as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21570  fi
21571
21572
21573
21574  # Non-required basic tools
21575
21576
21577
21578  # Publish this variable in the help.
21579
21580
21581  if [ -z "${LDD+x}" ]; then
21582    # The variable is not set by user, try to locate tool using the code snippet
21583    for ac_prog in ldd
21584do
21585  # Extract the first word of "$ac_prog", so it can be a program name with args.
21586set dummy $ac_prog; ac_word=$2
21587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21588$as_echo_n "checking for $ac_word... " >&6; }
21589if ${ac_cv_path_LDD+:} false; then :
21590  $as_echo_n "(cached) " >&6
21591else
21592  case $LDD in
21593  [\\/]* | ?:[\\/]*)
21594  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21595  ;;
21596  *)
21597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21598for as_dir in $PATH
21599do
21600  IFS=$as_save_IFS
21601  test -z "$as_dir" && as_dir=.
21602    for ac_exec_ext in '' $ac_executable_extensions; do
21603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21604    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21606    break 2
21607  fi
21608done
21609  done
21610IFS=$as_save_IFS
21611
21612  ;;
21613esac
21614fi
21615LDD=$ac_cv_path_LDD
21616if test -n "$LDD"; then
21617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21618$as_echo "$LDD" >&6; }
21619else
21620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21621$as_echo "no" >&6; }
21622fi
21623
21624
21625  test -n "$LDD" && break
21626done
21627
21628  else
21629    # The variable is set, but is it from the command line or the environment?
21630
21631    # Try to remove the string !LDD! from our list.
21632    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21633    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21634      # If it failed, the variable was not from the command line. Ignore it,
21635      # but warn the user (except for BASH, which is always set by the calling BASH).
21636      if test "xLDD" != xBASH; then
21637        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21638$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21639      fi
21640      # Try to locate tool using the code snippet
21641      for ac_prog in ldd
21642do
21643  # Extract the first word of "$ac_prog", so it can be a program name with args.
21644set dummy $ac_prog; ac_word=$2
21645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21646$as_echo_n "checking for $ac_word... " >&6; }
21647if ${ac_cv_path_LDD+:} false; then :
21648  $as_echo_n "(cached) " >&6
21649else
21650  case $LDD in
21651  [\\/]* | ?:[\\/]*)
21652  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21653  ;;
21654  *)
21655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21656for as_dir in $PATH
21657do
21658  IFS=$as_save_IFS
21659  test -z "$as_dir" && as_dir=.
21660    for ac_exec_ext in '' $ac_executable_extensions; do
21661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21662    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21664    break 2
21665  fi
21666done
21667  done
21668IFS=$as_save_IFS
21669
21670  ;;
21671esac
21672fi
21673LDD=$ac_cv_path_LDD
21674if test -n "$LDD"; then
21675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21676$as_echo "$LDD" >&6; }
21677else
21678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21679$as_echo "no" >&6; }
21680fi
21681
21682
21683  test -n "$LDD" && break
21684done
21685
21686    else
21687      # If it succeeded, then it was overridden by the user. We will use it
21688      # for the tool.
21689
21690      # First remove it from the list of overridden variables, so we can test
21691      # for unknown variables in the end.
21692      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21693
21694      # Check if we try to supply an empty value
21695      if test "x$LDD" = x; then
21696        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21697$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21698        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21699$as_echo_n "checking for LDD... " >&6; }
21700        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21701$as_echo "disabled" >&6; }
21702      else
21703        # Check if the provided tool contains a complete path.
21704        tool_specified="$LDD"
21705        tool_basename="${tool_specified##*/}"
21706        if test "x$tool_basename" = "x$tool_specified"; then
21707          # A command without a complete path is provided, search $PATH.
21708          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21709$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21710          # Extract the first word of "$tool_basename", so it can be a program name with args.
21711set dummy $tool_basename; ac_word=$2
21712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21713$as_echo_n "checking for $ac_word... " >&6; }
21714if ${ac_cv_path_LDD+:} false; then :
21715  $as_echo_n "(cached) " >&6
21716else
21717  case $LDD in
21718  [\\/]* | ?:[\\/]*)
21719  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21720  ;;
21721  *)
21722  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21723for as_dir in $PATH
21724do
21725  IFS=$as_save_IFS
21726  test -z "$as_dir" && as_dir=.
21727    for ac_exec_ext in '' $ac_executable_extensions; do
21728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21729    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21731    break 2
21732  fi
21733done
21734  done
21735IFS=$as_save_IFS
21736
21737  ;;
21738esac
21739fi
21740LDD=$ac_cv_path_LDD
21741if test -n "$LDD"; then
21742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21743$as_echo "$LDD" >&6; }
21744else
21745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21746$as_echo "no" >&6; }
21747fi
21748
21749
21750          if test "x$LDD" = x; then
21751            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21752          fi
21753        else
21754          # Otherwise we believe it is a complete path. Use it as it is.
21755          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21756$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21757          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21758$as_echo_n "checking for LDD... " >&6; }
21759          if test ! -x "$tool_specified"; then
21760            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21761$as_echo "not found" >&6; }
21762            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21763          fi
21764          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21765$as_echo "$tool_specified" >&6; }
21766        fi
21767      fi
21768    fi
21769
21770  fi
21771
21772
21773  if test "x$LDD" = "x"; then
21774    # List shared lib dependencies is used for
21775    # debug output and checking for forbidden dependencies.
21776    # We can build without it.
21777    LDD="true"
21778  fi
21779
21780
21781  # Publish this variable in the help.
21782
21783
21784  if [ -z "${OTOOL+x}" ]; then
21785    # The variable is not set by user, try to locate tool using the code snippet
21786    for ac_prog in otool
21787do
21788  # Extract the first word of "$ac_prog", so it can be a program name with args.
21789set dummy $ac_prog; ac_word=$2
21790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21791$as_echo_n "checking for $ac_word... " >&6; }
21792if ${ac_cv_path_OTOOL+:} false; then :
21793  $as_echo_n "(cached) " >&6
21794else
21795  case $OTOOL in
21796  [\\/]* | ?:[\\/]*)
21797  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21798  ;;
21799  *)
21800  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21801for as_dir in $PATH
21802do
21803  IFS=$as_save_IFS
21804  test -z "$as_dir" && as_dir=.
21805    for ac_exec_ext in '' $ac_executable_extensions; do
21806  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21807    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21808    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21809    break 2
21810  fi
21811done
21812  done
21813IFS=$as_save_IFS
21814
21815  ;;
21816esac
21817fi
21818OTOOL=$ac_cv_path_OTOOL
21819if test -n "$OTOOL"; then
21820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21821$as_echo "$OTOOL" >&6; }
21822else
21823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21824$as_echo "no" >&6; }
21825fi
21826
21827
21828  test -n "$OTOOL" && break
21829done
21830
21831  else
21832    # The variable is set, but is it from the command line or the environment?
21833
21834    # Try to remove the string !OTOOL! from our list.
21835    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21836    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21837      # If it failed, the variable was not from the command line. Ignore it,
21838      # but warn the user (except for BASH, which is always set by the calling BASH).
21839      if test "xOTOOL" != xBASH; then
21840        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21841$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21842      fi
21843      # Try to locate tool using the code snippet
21844      for ac_prog in otool
21845do
21846  # Extract the first word of "$ac_prog", so it can be a program name with args.
21847set dummy $ac_prog; ac_word=$2
21848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21849$as_echo_n "checking for $ac_word... " >&6; }
21850if ${ac_cv_path_OTOOL+:} false; then :
21851  $as_echo_n "(cached) " >&6
21852else
21853  case $OTOOL in
21854  [\\/]* | ?:[\\/]*)
21855  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21856  ;;
21857  *)
21858  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21859for as_dir in $PATH
21860do
21861  IFS=$as_save_IFS
21862  test -z "$as_dir" && as_dir=.
21863    for ac_exec_ext in '' $ac_executable_extensions; do
21864  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21865    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21866    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21867    break 2
21868  fi
21869done
21870  done
21871IFS=$as_save_IFS
21872
21873  ;;
21874esac
21875fi
21876OTOOL=$ac_cv_path_OTOOL
21877if test -n "$OTOOL"; then
21878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21879$as_echo "$OTOOL" >&6; }
21880else
21881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21882$as_echo "no" >&6; }
21883fi
21884
21885
21886  test -n "$OTOOL" && break
21887done
21888
21889    else
21890      # If it succeeded, then it was overridden by the user. We will use it
21891      # for the tool.
21892
21893      # First remove it from the list of overridden variables, so we can test
21894      # for unknown variables in the end.
21895      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21896
21897      # Check if we try to supply an empty value
21898      if test "x$OTOOL" = x; then
21899        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21900$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21901        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21902$as_echo_n "checking for OTOOL... " >&6; }
21903        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21904$as_echo "disabled" >&6; }
21905      else
21906        # Check if the provided tool contains a complete path.
21907        tool_specified="$OTOOL"
21908        tool_basename="${tool_specified##*/}"
21909        if test "x$tool_basename" = "x$tool_specified"; then
21910          # A command without a complete path is provided, search $PATH.
21911          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21912$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21913          # Extract the first word of "$tool_basename", so it can be a program name with args.
21914set dummy $tool_basename; ac_word=$2
21915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21916$as_echo_n "checking for $ac_word... " >&6; }
21917if ${ac_cv_path_OTOOL+:} false; then :
21918  $as_echo_n "(cached) " >&6
21919else
21920  case $OTOOL in
21921  [\\/]* | ?:[\\/]*)
21922  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21923  ;;
21924  *)
21925  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21926for as_dir in $PATH
21927do
21928  IFS=$as_save_IFS
21929  test -z "$as_dir" && as_dir=.
21930    for ac_exec_ext in '' $ac_executable_extensions; do
21931  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21932    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21933    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21934    break 2
21935  fi
21936done
21937  done
21938IFS=$as_save_IFS
21939
21940  ;;
21941esac
21942fi
21943OTOOL=$ac_cv_path_OTOOL
21944if test -n "$OTOOL"; then
21945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21946$as_echo "$OTOOL" >&6; }
21947else
21948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21949$as_echo "no" >&6; }
21950fi
21951
21952
21953          if test "x$OTOOL" = x; then
21954            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21955          fi
21956        else
21957          # Otherwise we believe it is a complete path. Use it as it is.
21958          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21959$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21960          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21961$as_echo_n "checking for OTOOL... " >&6; }
21962          if test ! -x "$tool_specified"; then
21963            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21964$as_echo "not found" >&6; }
21965            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21966          fi
21967          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21968$as_echo "$tool_specified" >&6; }
21969        fi
21970      fi
21971    fi
21972
21973  fi
21974
21975
21976  if test "x$OTOOL" = "x"; then
21977    OTOOL="true"
21978  fi
21979
21980
21981  # Publish this variable in the help.
21982
21983
21984  if [ -z "${READELF+x}" ]; then
21985    # The variable is not set by user, try to locate tool using the code snippet
21986    for ac_prog in greadelf readelf
21987do
21988  # Extract the first word of "$ac_prog", so it can be a program name with args.
21989set dummy $ac_prog; ac_word=$2
21990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21991$as_echo_n "checking for $ac_word... " >&6; }
21992if ${ac_cv_path_READELF+:} false; then :
21993  $as_echo_n "(cached) " >&6
21994else
21995  case $READELF in
21996  [\\/]* | ?:[\\/]*)
21997  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21998  ;;
21999  *)
22000  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22001for as_dir in $PATH
22002do
22003  IFS=$as_save_IFS
22004  test -z "$as_dir" && as_dir=.
22005    for ac_exec_ext in '' $ac_executable_extensions; do
22006  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22007    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22008    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22009    break 2
22010  fi
22011done
22012  done
22013IFS=$as_save_IFS
22014
22015  ;;
22016esac
22017fi
22018READELF=$ac_cv_path_READELF
22019if test -n "$READELF"; then
22020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22021$as_echo "$READELF" >&6; }
22022else
22023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22024$as_echo "no" >&6; }
22025fi
22026
22027
22028  test -n "$READELF" && break
22029done
22030
22031  else
22032    # The variable is set, but is it from the command line or the environment?
22033
22034    # Try to remove the string !READELF! from our list.
22035    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22036    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22037      # If it failed, the variable was not from the command line. Ignore it,
22038      # but warn the user (except for BASH, which is always set by the calling BASH).
22039      if test "xREADELF" != xBASH; then
22040        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22041$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22042      fi
22043      # Try to locate tool using the code snippet
22044      for ac_prog in greadelf readelf
22045do
22046  # Extract the first word of "$ac_prog", so it can be a program name with args.
22047set dummy $ac_prog; ac_word=$2
22048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22049$as_echo_n "checking for $ac_word... " >&6; }
22050if ${ac_cv_path_READELF+:} false; then :
22051  $as_echo_n "(cached) " >&6
22052else
22053  case $READELF in
22054  [\\/]* | ?:[\\/]*)
22055  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22056  ;;
22057  *)
22058  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22059for as_dir in $PATH
22060do
22061  IFS=$as_save_IFS
22062  test -z "$as_dir" && as_dir=.
22063    for ac_exec_ext in '' $ac_executable_extensions; do
22064  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22065    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22066    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22067    break 2
22068  fi
22069done
22070  done
22071IFS=$as_save_IFS
22072
22073  ;;
22074esac
22075fi
22076READELF=$ac_cv_path_READELF
22077if test -n "$READELF"; then
22078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22079$as_echo "$READELF" >&6; }
22080else
22081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22082$as_echo "no" >&6; }
22083fi
22084
22085
22086  test -n "$READELF" && break
22087done
22088
22089    else
22090      # If it succeeded, then it was overridden by the user. We will use it
22091      # for the tool.
22092
22093      # First remove it from the list of overridden variables, so we can test
22094      # for unknown variables in the end.
22095      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22096
22097      # Check if we try to supply an empty value
22098      if test "x$READELF" = x; then
22099        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22100$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22101        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22102$as_echo_n "checking for READELF... " >&6; }
22103        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22104$as_echo "disabled" >&6; }
22105      else
22106        # Check if the provided tool contains a complete path.
22107        tool_specified="$READELF"
22108        tool_basename="${tool_specified##*/}"
22109        if test "x$tool_basename" = "x$tool_specified"; then
22110          # A command without a complete path is provided, search $PATH.
22111          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22112$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22113          # Extract the first word of "$tool_basename", so it can be a program name with args.
22114set dummy $tool_basename; ac_word=$2
22115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22116$as_echo_n "checking for $ac_word... " >&6; }
22117if ${ac_cv_path_READELF+:} false; then :
22118  $as_echo_n "(cached) " >&6
22119else
22120  case $READELF in
22121  [\\/]* | ?:[\\/]*)
22122  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22123  ;;
22124  *)
22125  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22126for as_dir in $PATH
22127do
22128  IFS=$as_save_IFS
22129  test -z "$as_dir" && as_dir=.
22130    for ac_exec_ext in '' $ac_executable_extensions; do
22131  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22132    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22134    break 2
22135  fi
22136done
22137  done
22138IFS=$as_save_IFS
22139
22140  ;;
22141esac
22142fi
22143READELF=$ac_cv_path_READELF
22144if test -n "$READELF"; then
22145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22146$as_echo "$READELF" >&6; }
22147else
22148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22149$as_echo "no" >&6; }
22150fi
22151
22152
22153          if test "x$READELF" = x; then
22154            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22155          fi
22156        else
22157          # Otherwise we believe it is a complete path. Use it as it is.
22158          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22159$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22160          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22161$as_echo_n "checking for READELF... " >&6; }
22162          if test ! -x "$tool_specified"; then
22163            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22164$as_echo "not found" >&6; }
22165            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22166          fi
22167          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22168$as_echo "$tool_specified" >&6; }
22169        fi
22170      fi
22171    fi
22172
22173  fi
22174
22175
22176
22177
22178  # Publish this variable in the help.
22179
22180
22181  if [ -z "${HG+x}" ]; then
22182    # The variable is not set by user, try to locate tool using the code snippet
22183    for ac_prog in hg
22184do
22185  # Extract the first word of "$ac_prog", so it can be a program name with args.
22186set dummy $ac_prog; ac_word=$2
22187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22188$as_echo_n "checking for $ac_word... " >&6; }
22189if ${ac_cv_path_HG+:} false; then :
22190  $as_echo_n "(cached) " >&6
22191else
22192  case $HG in
22193  [\\/]* | ?:[\\/]*)
22194  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22195  ;;
22196  *)
22197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22198for as_dir in $PATH
22199do
22200  IFS=$as_save_IFS
22201  test -z "$as_dir" && as_dir=.
22202    for ac_exec_ext in '' $ac_executable_extensions; do
22203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22204    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22206    break 2
22207  fi
22208done
22209  done
22210IFS=$as_save_IFS
22211
22212  ;;
22213esac
22214fi
22215HG=$ac_cv_path_HG
22216if test -n "$HG"; then
22217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22218$as_echo "$HG" >&6; }
22219else
22220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22221$as_echo "no" >&6; }
22222fi
22223
22224
22225  test -n "$HG" && break
22226done
22227
22228  else
22229    # The variable is set, but is it from the command line or the environment?
22230
22231    # Try to remove the string !HG! from our list.
22232    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22233    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22234      # If it failed, the variable was not from the command line. Ignore it,
22235      # but warn the user (except for BASH, which is always set by the calling BASH).
22236      if test "xHG" != xBASH; then
22237        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22238$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22239      fi
22240      # Try to locate tool using the code snippet
22241      for ac_prog in hg
22242do
22243  # Extract the first word of "$ac_prog", so it can be a program name with args.
22244set dummy $ac_prog; ac_word=$2
22245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22246$as_echo_n "checking for $ac_word... " >&6; }
22247if ${ac_cv_path_HG+:} false; then :
22248  $as_echo_n "(cached) " >&6
22249else
22250  case $HG in
22251  [\\/]* | ?:[\\/]*)
22252  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22253  ;;
22254  *)
22255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22256for as_dir in $PATH
22257do
22258  IFS=$as_save_IFS
22259  test -z "$as_dir" && as_dir=.
22260    for ac_exec_ext in '' $ac_executable_extensions; do
22261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22262    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22264    break 2
22265  fi
22266done
22267  done
22268IFS=$as_save_IFS
22269
22270  ;;
22271esac
22272fi
22273HG=$ac_cv_path_HG
22274if test -n "$HG"; then
22275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22276$as_echo "$HG" >&6; }
22277else
22278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22279$as_echo "no" >&6; }
22280fi
22281
22282
22283  test -n "$HG" && break
22284done
22285
22286    else
22287      # If it succeeded, then it was overridden by the user. We will use it
22288      # for the tool.
22289
22290      # First remove it from the list of overridden variables, so we can test
22291      # for unknown variables in the end.
22292      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22293
22294      # Check if we try to supply an empty value
22295      if test "x$HG" = x; then
22296        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22297$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22298        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22299$as_echo_n "checking for HG... " >&6; }
22300        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22301$as_echo "disabled" >&6; }
22302      else
22303        # Check if the provided tool contains a complete path.
22304        tool_specified="$HG"
22305        tool_basename="${tool_specified##*/}"
22306        if test "x$tool_basename" = "x$tool_specified"; then
22307          # A command without a complete path is provided, search $PATH.
22308          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22309$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22310          # Extract the first word of "$tool_basename", so it can be a program name with args.
22311set dummy $tool_basename; ac_word=$2
22312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22313$as_echo_n "checking for $ac_word... " >&6; }
22314if ${ac_cv_path_HG+:} false; then :
22315  $as_echo_n "(cached) " >&6
22316else
22317  case $HG in
22318  [\\/]* | ?:[\\/]*)
22319  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22320  ;;
22321  *)
22322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22323for as_dir in $PATH
22324do
22325  IFS=$as_save_IFS
22326  test -z "$as_dir" && as_dir=.
22327    for ac_exec_ext in '' $ac_executable_extensions; do
22328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22329    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22331    break 2
22332  fi
22333done
22334  done
22335IFS=$as_save_IFS
22336
22337  ;;
22338esac
22339fi
22340HG=$ac_cv_path_HG
22341if test -n "$HG"; then
22342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22343$as_echo "$HG" >&6; }
22344else
22345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22346$as_echo "no" >&6; }
22347fi
22348
22349
22350          if test "x$HG" = x; then
22351            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22352          fi
22353        else
22354          # Otherwise we believe it is a complete path. Use it as it is.
22355          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22356$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22357          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22358$as_echo_n "checking for HG... " >&6; }
22359          if test ! -x "$tool_specified"; then
22360            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22361$as_echo "not found" >&6; }
22362            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22363          fi
22364          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22365$as_echo "$tool_specified" >&6; }
22366        fi
22367      fi
22368    fi
22369
22370  fi
22371
22372
22373
22374
22375  # Publish this variable in the help.
22376
22377
22378  if [ -z "${STAT+x}" ]; then
22379    # The variable is not set by user, try to locate tool using the code snippet
22380    for ac_prog in stat
22381do
22382  # Extract the first word of "$ac_prog", so it can be a program name with args.
22383set dummy $ac_prog; ac_word=$2
22384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22385$as_echo_n "checking for $ac_word... " >&6; }
22386if ${ac_cv_path_STAT+:} false; then :
22387  $as_echo_n "(cached) " >&6
22388else
22389  case $STAT in
22390  [\\/]* | ?:[\\/]*)
22391  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22392  ;;
22393  *)
22394  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22395for as_dir in $PATH
22396do
22397  IFS=$as_save_IFS
22398  test -z "$as_dir" && as_dir=.
22399    for ac_exec_ext in '' $ac_executable_extensions; do
22400  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22401    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22402    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22403    break 2
22404  fi
22405done
22406  done
22407IFS=$as_save_IFS
22408
22409  ;;
22410esac
22411fi
22412STAT=$ac_cv_path_STAT
22413if test -n "$STAT"; then
22414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22415$as_echo "$STAT" >&6; }
22416else
22417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22418$as_echo "no" >&6; }
22419fi
22420
22421
22422  test -n "$STAT" && break
22423done
22424
22425  else
22426    # The variable is set, but is it from the command line or the environment?
22427
22428    # Try to remove the string !STAT! from our list.
22429    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22430    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22431      # If it failed, the variable was not from the command line. Ignore it,
22432      # but warn the user (except for BASH, which is always set by the calling BASH).
22433      if test "xSTAT" != xBASH; then
22434        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22435$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22436      fi
22437      # Try to locate tool using the code snippet
22438      for ac_prog in stat
22439do
22440  # Extract the first word of "$ac_prog", so it can be a program name with args.
22441set dummy $ac_prog; ac_word=$2
22442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22443$as_echo_n "checking for $ac_word... " >&6; }
22444if ${ac_cv_path_STAT+:} false; then :
22445  $as_echo_n "(cached) " >&6
22446else
22447  case $STAT in
22448  [\\/]* | ?:[\\/]*)
22449  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22450  ;;
22451  *)
22452  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22453for as_dir in $PATH
22454do
22455  IFS=$as_save_IFS
22456  test -z "$as_dir" && as_dir=.
22457    for ac_exec_ext in '' $ac_executable_extensions; do
22458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22459    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22461    break 2
22462  fi
22463done
22464  done
22465IFS=$as_save_IFS
22466
22467  ;;
22468esac
22469fi
22470STAT=$ac_cv_path_STAT
22471if test -n "$STAT"; then
22472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22473$as_echo "$STAT" >&6; }
22474else
22475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22476$as_echo "no" >&6; }
22477fi
22478
22479
22480  test -n "$STAT" && break
22481done
22482
22483    else
22484      # If it succeeded, then it was overridden by the user. We will use it
22485      # for the tool.
22486
22487      # First remove it from the list of overridden variables, so we can test
22488      # for unknown variables in the end.
22489      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22490
22491      # Check if we try to supply an empty value
22492      if test "x$STAT" = x; then
22493        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22494$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22495        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22496$as_echo_n "checking for STAT... " >&6; }
22497        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22498$as_echo "disabled" >&6; }
22499      else
22500        # Check if the provided tool contains a complete path.
22501        tool_specified="$STAT"
22502        tool_basename="${tool_specified##*/}"
22503        if test "x$tool_basename" = "x$tool_specified"; then
22504          # A command without a complete path is provided, search $PATH.
22505          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22506$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22507          # Extract the first word of "$tool_basename", so it can be a program name with args.
22508set dummy $tool_basename; ac_word=$2
22509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22510$as_echo_n "checking for $ac_word... " >&6; }
22511if ${ac_cv_path_STAT+:} false; then :
22512  $as_echo_n "(cached) " >&6
22513else
22514  case $STAT in
22515  [\\/]* | ?:[\\/]*)
22516  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22517  ;;
22518  *)
22519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22520for as_dir in $PATH
22521do
22522  IFS=$as_save_IFS
22523  test -z "$as_dir" && as_dir=.
22524    for ac_exec_ext in '' $ac_executable_extensions; do
22525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22526    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22528    break 2
22529  fi
22530done
22531  done
22532IFS=$as_save_IFS
22533
22534  ;;
22535esac
22536fi
22537STAT=$ac_cv_path_STAT
22538if test -n "$STAT"; then
22539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22540$as_echo "$STAT" >&6; }
22541else
22542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22543$as_echo "no" >&6; }
22544fi
22545
22546
22547          if test "x$STAT" = x; then
22548            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22549          fi
22550        else
22551          # Otherwise we believe it is a complete path. Use it as it is.
22552          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22553$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22554          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22555$as_echo_n "checking for STAT... " >&6; }
22556          if test ! -x "$tool_specified"; then
22557            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22558$as_echo "not found" >&6; }
22559            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22560          fi
22561          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22562$as_echo "$tool_specified" >&6; }
22563        fi
22564      fi
22565    fi
22566
22567  fi
22568
22569
22570
22571
22572  # Publish this variable in the help.
22573
22574
22575  if [ -z "${TIME+x}" ]; then
22576    # The variable is not set by user, try to locate tool using the code snippet
22577    for ac_prog in time
22578do
22579  # Extract the first word of "$ac_prog", so it can be a program name with args.
22580set dummy $ac_prog; ac_word=$2
22581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22582$as_echo_n "checking for $ac_word... " >&6; }
22583if ${ac_cv_path_TIME+:} false; then :
22584  $as_echo_n "(cached) " >&6
22585else
22586  case $TIME in
22587  [\\/]* | ?:[\\/]*)
22588  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22589  ;;
22590  *)
22591  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22592for as_dir in $PATH
22593do
22594  IFS=$as_save_IFS
22595  test -z "$as_dir" && as_dir=.
22596    for ac_exec_ext in '' $ac_executable_extensions; do
22597  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22598    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22600    break 2
22601  fi
22602done
22603  done
22604IFS=$as_save_IFS
22605
22606  ;;
22607esac
22608fi
22609TIME=$ac_cv_path_TIME
22610if test -n "$TIME"; then
22611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22612$as_echo "$TIME" >&6; }
22613else
22614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22615$as_echo "no" >&6; }
22616fi
22617
22618
22619  test -n "$TIME" && break
22620done
22621
22622  else
22623    # The variable is set, but is it from the command line or the environment?
22624
22625    # Try to remove the string !TIME! from our list.
22626    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22627    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22628      # If it failed, the variable was not from the command line. Ignore it,
22629      # but warn the user (except for BASH, which is always set by the calling BASH).
22630      if test "xTIME" != xBASH; then
22631        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22632$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22633      fi
22634      # Try to locate tool using the code snippet
22635      for ac_prog in time
22636do
22637  # Extract the first word of "$ac_prog", so it can be a program name with args.
22638set dummy $ac_prog; ac_word=$2
22639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22640$as_echo_n "checking for $ac_word... " >&6; }
22641if ${ac_cv_path_TIME+:} false; then :
22642  $as_echo_n "(cached) " >&6
22643else
22644  case $TIME in
22645  [\\/]* | ?:[\\/]*)
22646  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22647  ;;
22648  *)
22649  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22650for as_dir in $PATH
22651do
22652  IFS=$as_save_IFS
22653  test -z "$as_dir" && as_dir=.
22654    for ac_exec_ext in '' $ac_executable_extensions; do
22655  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22656    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22658    break 2
22659  fi
22660done
22661  done
22662IFS=$as_save_IFS
22663
22664  ;;
22665esac
22666fi
22667TIME=$ac_cv_path_TIME
22668if test -n "$TIME"; then
22669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22670$as_echo "$TIME" >&6; }
22671else
22672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22673$as_echo "no" >&6; }
22674fi
22675
22676
22677  test -n "$TIME" && break
22678done
22679
22680    else
22681      # If it succeeded, then it was overridden by the user. We will use it
22682      # for the tool.
22683
22684      # First remove it from the list of overridden variables, so we can test
22685      # for unknown variables in the end.
22686      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22687
22688      # Check if we try to supply an empty value
22689      if test "x$TIME" = x; then
22690        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22691$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22692        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22693$as_echo_n "checking for TIME... " >&6; }
22694        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22695$as_echo "disabled" >&6; }
22696      else
22697        # Check if the provided tool contains a complete path.
22698        tool_specified="$TIME"
22699        tool_basename="${tool_specified##*/}"
22700        if test "x$tool_basename" = "x$tool_specified"; then
22701          # A command without a complete path is provided, search $PATH.
22702          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22703$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22704          # Extract the first word of "$tool_basename", so it can be a program name with args.
22705set dummy $tool_basename; ac_word=$2
22706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22707$as_echo_n "checking for $ac_word... " >&6; }
22708if ${ac_cv_path_TIME+:} false; then :
22709  $as_echo_n "(cached) " >&6
22710else
22711  case $TIME in
22712  [\\/]* | ?:[\\/]*)
22713  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22714  ;;
22715  *)
22716  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22717for as_dir in $PATH
22718do
22719  IFS=$as_save_IFS
22720  test -z "$as_dir" && as_dir=.
22721    for ac_exec_ext in '' $ac_executable_extensions; do
22722  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22723    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22724    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22725    break 2
22726  fi
22727done
22728  done
22729IFS=$as_save_IFS
22730
22731  ;;
22732esac
22733fi
22734TIME=$ac_cv_path_TIME
22735if test -n "$TIME"; then
22736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22737$as_echo "$TIME" >&6; }
22738else
22739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22740$as_echo "no" >&6; }
22741fi
22742
22743
22744          if test "x$TIME" = x; then
22745            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22746          fi
22747        else
22748          # Otherwise we believe it is a complete path. Use it as it is.
22749          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22750$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22751          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22752$as_echo_n "checking for TIME... " >&6; }
22753          if test ! -x "$tool_specified"; then
22754            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22755$as_echo "not found" >&6; }
22756            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22757          fi
22758          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22759$as_echo "$tool_specified" >&6; }
22760        fi
22761      fi
22762    fi
22763
22764  fi
22765
22766
22767  # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
22768  # be in the user path.
22769
22770
22771  # Publish this variable in the help.
22772
22773
22774  if [ -z "${DTRACE+x}" ]; then
22775    # The variable is not set by user, try to locate tool using the code snippet
22776    for ac_prog in dtrace
22777do
22778  # Extract the first word of "$ac_prog", so it can be a program name with args.
22779set dummy $ac_prog; ac_word=$2
22780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22781$as_echo_n "checking for $ac_word... " >&6; }
22782if ${ac_cv_path_DTRACE+:} false; then :
22783  $as_echo_n "(cached) " >&6
22784else
22785  case $DTRACE in
22786  [\\/]* | ?:[\\/]*)
22787  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22788  ;;
22789  *)
22790  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22791as_dummy="$PATH:/usr/sbin"
22792for as_dir in $as_dummy
22793do
22794  IFS=$as_save_IFS
22795  test -z "$as_dir" && as_dir=.
22796    for ac_exec_ext in '' $ac_executable_extensions; do
22797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22798    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22800    break 2
22801  fi
22802done
22803  done
22804IFS=$as_save_IFS
22805
22806  ;;
22807esac
22808fi
22809DTRACE=$ac_cv_path_DTRACE
22810if test -n "$DTRACE"; then
22811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22812$as_echo "$DTRACE" >&6; }
22813else
22814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22815$as_echo "no" >&6; }
22816fi
22817
22818
22819  test -n "$DTRACE" && break
22820done
22821
22822  else
22823    # The variable is set, but is it from the command line or the environment?
22824
22825    # Try to remove the string !DTRACE! from our list.
22826    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22827    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22828      # If it failed, the variable was not from the command line. Ignore it,
22829      # but warn the user (except for BASH, which is always set by the calling BASH).
22830      if test "xDTRACE" != xBASH; then
22831        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22832$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22833      fi
22834      # Try to locate tool using the code snippet
22835      for ac_prog in dtrace
22836do
22837  # Extract the first word of "$ac_prog", so it can be a program name with args.
22838set dummy $ac_prog; ac_word=$2
22839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22840$as_echo_n "checking for $ac_word... " >&6; }
22841if ${ac_cv_path_DTRACE+:} false; then :
22842  $as_echo_n "(cached) " >&6
22843else
22844  case $DTRACE in
22845  [\\/]* | ?:[\\/]*)
22846  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22847  ;;
22848  *)
22849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22850as_dummy="$PATH:/usr/sbin"
22851for as_dir in $as_dummy
22852do
22853  IFS=$as_save_IFS
22854  test -z "$as_dir" && as_dir=.
22855    for ac_exec_ext in '' $ac_executable_extensions; do
22856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22857    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22859    break 2
22860  fi
22861done
22862  done
22863IFS=$as_save_IFS
22864
22865  ;;
22866esac
22867fi
22868DTRACE=$ac_cv_path_DTRACE
22869if test -n "$DTRACE"; then
22870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22871$as_echo "$DTRACE" >&6; }
22872else
22873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22874$as_echo "no" >&6; }
22875fi
22876
22877
22878  test -n "$DTRACE" && break
22879done
22880
22881    else
22882      # If it succeeded, then it was overridden by the user. We will use it
22883      # for the tool.
22884
22885      # First remove it from the list of overridden variables, so we can test
22886      # for unknown variables in the end.
22887      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22888
22889      # Check if we try to supply an empty value
22890      if test "x$DTRACE" = x; then
22891        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22892$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22893        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22894$as_echo_n "checking for DTRACE... " >&6; }
22895        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22896$as_echo "disabled" >&6; }
22897      else
22898        # Check if the provided tool contains a complete path.
22899        tool_specified="$DTRACE"
22900        tool_basename="${tool_specified##*/}"
22901        if test "x$tool_basename" = "x$tool_specified"; then
22902          # A command without a complete path is provided, search $PATH.
22903          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22904$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22905          # Extract the first word of "$tool_basename", so it can be a program name with args.
22906set dummy $tool_basename; ac_word=$2
22907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22908$as_echo_n "checking for $ac_word... " >&6; }
22909if ${ac_cv_path_DTRACE+:} false; then :
22910  $as_echo_n "(cached) " >&6
22911else
22912  case $DTRACE in
22913  [\\/]* | ?:[\\/]*)
22914  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22915  ;;
22916  *)
22917  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22918for as_dir in $PATH
22919do
22920  IFS=$as_save_IFS
22921  test -z "$as_dir" && as_dir=.
22922    for ac_exec_ext in '' $ac_executable_extensions; do
22923  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22924    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22925    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22926    break 2
22927  fi
22928done
22929  done
22930IFS=$as_save_IFS
22931
22932  ;;
22933esac
22934fi
22935DTRACE=$ac_cv_path_DTRACE
22936if test -n "$DTRACE"; then
22937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22938$as_echo "$DTRACE" >&6; }
22939else
22940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22941$as_echo "no" >&6; }
22942fi
22943
22944
22945          if test "x$DTRACE" = x; then
22946            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22947          fi
22948        else
22949          # Otherwise we believe it is a complete path. Use it as it is.
22950          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
22951$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
22952          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22953$as_echo_n "checking for DTRACE... " >&6; }
22954          if test ! -x "$tool_specified"; then
22955            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22956$as_echo "not found" >&6; }
22957            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
22958          fi
22959          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22960$as_echo "$tool_specified" >&6; }
22961        fi
22962      fi
22963    fi
22964
22965  fi
22966
22967
22968
22969
22970  # Publish this variable in the help.
22971
22972
22973  if [ -z "${PATCH+x}" ]; then
22974    # The variable is not set by user, try to locate tool using the code snippet
22975    for ac_prog in gpatch patch
22976do
22977  # Extract the first word of "$ac_prog", so it can be a program name with args.
22978set dummy $ac_prog; ac_word=$2
22979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22980$as_echo_n "checking for $ac_word... " >&6; }
22981if ${ac_cv_path_PATCH+:} false; then :
22982  $as_echo_n "(cached) " >&6
22983else
22984  case $PATCH in
22985  [\\/]* | ?:[\\/]*)
22986  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22987  ;;
22988  *)
22989  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22990for as_dir in $PATH
22991do
22992  IFS=$as_save_IFS
22993  test -z "$as_dir" && as_dir=.
22994    for ac_exec_ext in '' $ac_executable_extensions; do
22995  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22996    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22997    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22998    break 2
22999  fi
23000done
23001  done
23002IFS=$as_save_IFS
23003
23004  ;;
23005esac
23006fi
23007PATCH=$ac_cv_path_PATCH
23008if test -n "$PATCH"; then
23009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23010$as_echo "$PATCH" >&6; }
23011else
23012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23013$as_echo "no" >&6; }
23014fi
23015
23016
23017  test -n "$PATCH" && break
23018done
23019
23020  else
23021    # The variable is set, but is it from the command line or the environment?
23022
23023    # Try to remove the string !PATCH! from our list.
23024    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23025    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23026      # If it failed, the variable was not from the command line. Ignore it,
23027      # but warn the user (except for BASH, which is always set by the calling BASH).
23028      if test "xPATCH" != xBASH; then
23029        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23030$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23031      fi
23032      # Try to locate tool using the code snippet
23033      for ac_prog in gpatch patch
23034do
23035  # Extract the first word of "$ac_prog", so it can be a program name with args.
23036set dummy $ac_prog; ac_word=$2
23037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23038$as_echo_n "checking for $ac_word... " >&6; }
23039if ${ac_cv_path_PATCH+:} false; then :
23040  $as_echo_n "(cached) " >&6
23041else
23042  case $PATCH in
23043  [\\/]* | ?:[\\/]*)
23044  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23045  ;;
23046  *)
23047  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23048for as_dir in $PATH
23049do
23050  IFS=$as_save_IFS
23051  test -z "$as_dir" && as_dir=.
23052    for ac_exec_ext in '' $ac_executable_extensions; do
23053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23054    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23056    break 2
23057  fi
23058done
23059  done
23060IFS=$as_save_IFS
23061
23062  ;;
23063esac
23064fi
23065PATCH=$ac_cv_path_PATCH
23066if test -n "$PATCH"; then
23067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23068$as_echo "$PATCH" >&6; }
23069else
23070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23071$as_echo "no" >&6; }
23072fi
23073
23074
23075  test -n "$PATCH" && break
23076done
23077
23078    else
23079      # If it succeeded, then it was overridden by the user. We will use it
23080      # for the tool.
23081
23082      # First remove it from the list of overridden variables, so we can test
23083      # for unknown variables in the end.
23084      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23085
23086      # Check if we try to supply an empty value
23087      if test "x$PATCH" = x; then
23088        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23089$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23090        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23091$as_echo_n "checking for PATCH... " >&6; }
23092        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23093$as_echo "disabled" >&6; }
23094      else
23095        # Check if the provided tool contains a complete path.
23096        tool_specified="$PATCH"
23097        tool_basename="${tool_specified##*/}"
23098        if test "x$tool_basename" = "x$tool_specified"; then
23099          # A command without a complete path is provided, search $PATH.
23100          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23101$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23102          # Extract the first word of "$tool_basename", so it can be a program name with args.
23103set dummy $tool_basename; ac_word=$2
23104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23105$as_echo_n "checking for $ac_word... " >&6; }
23106if ${ac_cv_path_PATCH+:} false; then :
23107  $as_echo_n "(cached) " >&6
23108else
23109  case $PATCH in
23110  [\\/]* | ?:[\\/]*)
23111  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23112  ;;
23113  *)
23114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23115for as_dir in $PATH
23116do
23117  IFS=$as_save_IFS
23118  test -z "$as_dir" && as_dir=.
23119    for ac_exec_ext in '' $ac_executable_extensions; do
23120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23121    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23123    break 2
23124  fi
23125done
23126  done
23127IFS=$as_save_IFS
23128
23129  ;;
23130esac
23131fi
23132PATCH=$ac_cv_path_PATCH
23133if test -n "$PATCH"; then
23134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23135$as_echo "$PATCH" >&6; }
23136else
23137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23138$as_echo "no" >&6; }
23139fi
23140
23141
23142          if test "x$PATCH" = x; then
23143            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23144          fi
23145        else
23146          # Otherwise we believe it is a complete path. Use it as it is.
23147          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23148$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23149          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23150$as_echo_n "checking for PATCH... " >&6; }
23151          if test ! -x "$tool_specified"; then
23152            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23153$as_echo "not found" >&6; }
23154            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23155          fi
23156          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23157$as_echo "$tool_specified" >&6; }
23158        fi
23159      fi
23160    fi
23161
23162  fi
23163
23164
23165  # Check if it's GNU time
23166  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23167  if test "x$IS_GNU_TIME" != x; then
23168    IS_GNU_TIME=yes
23169  else
23170    IS_GNU_TIME=no
23171  fi
23172
23173
23174  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23175
23176
23177
23178  # Publish this variable in the help.
23179
23180
23181  if [ -z "${DSYMUTIL+x}" ]; then
23182    # The variable is not set by user, try to locate tool using the code snippet
23183    for ac_prog in dsymutil
23184do
23185  # Extract the first word of "$ac_prog", so it can be a program name with args.
23186set dummy $ac_prog; ac_word=$2
23187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23188$as_echo_n "checking for $ac_word... " >&6; }
23189if ${ac_cv_path_DSYMUTIL+:} false; then :
23190  $as_echo_n "(cached) " >&6
23191else
23192  case $DSYMUTIL in
23193  [\\/]* | ?:[\\/]*)
23194  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23195  ;;
23196  *)
23197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23198for as_dir in $PATH
23199do
23200  IFS=$as_save_IFS
23201  test -z "$as_dir" && as_dir=.
23202    for ac_exec_ext in '' $ac_executable_extensions; do
23203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23204    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23206    break 2
23207  fi
23208done
23209  done
23210IFS=$as_save_IFS
23211
23212  ;;
23213esac
23214fi
23215DSYMUTIL=$ac_cv_path_DSYMUTIL
23216if test -n "$DSYMUTIL"; then
23217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23218$as_echo "$DSYMUTIL" >&6; }
23219else
23220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23221$as_echo "no" >&6; }
23222fi
23223
23224
23225  test -n "$DSYMUTIL" && break
23226done
23227
23228  else
23229    # The variable is set, but is it from the command line or the environment?
23230
23231    # Try to remove the string !DSYMUTIL! from our list.
23232    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23233    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23234      # If it failed, the variable was not from the command line. Ignore it,
23235      # but warn the user (except for BASH, which is always set by the calling BASH).
23236      if test "xDSYMUTIL" != xBASH; then
23237        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23238$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23239      fi
23240      # Try to locate tool using the code snippet
23241      for ac_prog in dsymutil
23242do
23243  # Extract the first word of "$ac_prog", so it can be a program name with args.
23244set dummy $ac_prog; ac_word=$2
23245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23246$as_echo_n "checking for $ac_word... " >&6; }
23247if ${ac_cv_path_DSYMUTIL+:} false; then :
23248  $as_echo_n "(cached) " >&6
23249else
23250  case $DSYMUTIL in
23251  [\\/]* | ?:[\\/]*)
23252  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23253  ;;
23254  *)
23255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23256for as_dir in $PATH
23257do
23258  IFS=$as_save_IFS
23259  test -z "$as_dir" && as_dir=.
23260    for ac_exec_ext in '' $ac_executable_extensions; do
23261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23262    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23264    break 2
23265  fi
23266done
23267  done
23268IFS=$as_save_IFS
23269
23270  ;;
23271esac
23272fi
23273DSYMUTIL=$ac_cv_path_DSYMUTIL
23274if test -n "$DSYMUTIL"; then
23275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23276$as_echo "$DSYMUTIL" >&6; }
23277else
23278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23279$as_echo "no" >&6; }
23280fi
23281
23282
23283  test -n "$DSYMUTIL" && break
23284done
23285
23286    else
23287      # If it succeeded, then it was overridden by the user. We will use it
23288      # for the tool.
23289
23290      # First remove it from the list of overridden variables, so we can test
23291      # for unknown variables in the end.
23292      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23293
23294      # Check if we try to supply an empty value
23295      if test "x$DSYMUTIL" = x; then
23296        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23297$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23298        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23299$as_echo_n "checking for DSYMUTIL... " >&6; }
23300        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23301$as_echo "disabled" >&6; }
23302      else
23303        # Check if the provided tool contains a complete path.
23304        tool_specified="$DSYMUTIL"
23305        tool_basename="${tool_specified##*/}"
23306        if test "x$tool_basename" = "x$tool_specified"; then
23307          # A command without a complete path is provided, search $PATH.
23308          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23309$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23310          # Extract the first word of "$tool_basename", so it can be a program name with args.
23311set dummy $tool_basename; ac_word=$2
23312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23313$as_echo_n "checking for $ac_word... " >&6; }
23314if ${ac_cv_path_DSYMUTIL+:} false; then :
23315  $as_echo_n "(cached) " >&6
23316else
23317  case $DSYMUTIL in
23318  [\\/]* | ?:[\\/]*)
23319  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23320  ;;
23321  *)
23322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23323for as_dir in $PATH
23324do
23325  IFS=$as_save_IFS
23326  test -z "$as_dir" && as_dir=.
23327    for ac_exec_ext in '' $ac_executable_extensions; do
23328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23329    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23331    break 2
23332  fi
23333done
23334  done
23335IFS=$as_save_IFS
23336
23337  ;;
23338esac
23339fi
23340DSYMUTIL=$ac_cv_path_DSYMUTIL
23341if test -n "$DSYMUTIL"; then
23342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23343$as_echo "$DSYMUTIL" >&6; }
23344else
23345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23346$as_echo "no" >&6; }
23347fi
23348
23349
23350          if test "x$DSYMUTIL" = x; then
23351            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23352          fi
23353        else
23354          # Otherwise we believe it is a complete path. Use it as it is.
23355          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23356$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23357          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23358$as_echo_n "checking for DSYMUTIL... " >&6; }
23359          if test ! -x "$tool_specified"; then
23360            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23361$as_echo "not found" >&6; }
23362            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23363          fi
23364          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23365$as_echo "$tool_specified" >&6; }
23366        fi
23367      fi
23368    fi
23369
23370  fi
23371
23372
23373
23374  if test "x$DSYMUTIL" = x; then
23375    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23376  fi
23377
23378
23379
23380
23381
23382  # Publish this variable in the help.
23383
23384
23385  if [ -z "${XATTR+x}" ]; then
23386    # The variable is not set by user, try to locate tool using the code snippet
23387    for ac_prog in xattr
23388do
23389  # Extract the first word of "$ac_prog", so it can be a program name with args.
23390set dummy $ac_prog; ac_word=$2
23391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23392$as_echo_n "checking for $ac_word... " >&6; }
23393if ${ac_cv_path_XATTR+:} false; then :
23394  $as_echo_n "(cached) " >&6
23395else
23396  case $XATTR in
23397  [\\/]* | ?:[\\/]*)
23398  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23399  ;;
23400  *)
23401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23402for as_dir in $PATH
23403do
23404  IFS=$as_save_IFS
23405  test -z "$as_dir" && as_dir=.
23406    for ac_exec_ext in '' $ac_executable_extensions; do
23407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23408    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23410    break 2
23411  fi
23412done
23413  done
23414IFS=$as_save_IFS
23415
23416  ;;
23417esac
23418fi
23419XATTR=$ac_cv_path_XATTR
23420if test -n "$XATTR"; then
23421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23422$as_echo "$XATTR" >&6; }
23423else
23424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23425$as_echo "no" >&6; }
23426fi
23427
23428
23429  test -n "$XATTR" && break
23430done
23431
23432  else
23433    # The variable is set, but is it from the command line or the environment?
23434
23435    # Try to remove the string !XATTR! from our list.
23436    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23437    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23438      # If it failed, the variable was not from the command line. Ignore it,
23439      # but warn the user (except for BASH, which is always set by the calling BASH).
23440      if test "xXATTR" != xBASH; then
23441        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23442$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23443      fi
23444      # Try to locate tool using the code snippet
23445      for ac_prog in xattr
23446do
23447  # Extract the first word of "$ac_prog", so it can be a program name with args.
23448set dummy $ac_prog; ac_word=$2
23449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23450$as_echo_n "checking for $ac_word... " >&6; }
23451if ${ac_cv_path_XATTR+:} false; then :
23452  $as_echo_n "(cached) " >&6
23453else
23454  case $XATTR in
23455  [\\/]* | ?:[\\/]*)
23456  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23457  ;;
23458  *)
23459  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23460for as_dir in $PATH
23461do
23462  IFS=$as_save_IFS
23463  test -z "$as_dir" && as_dir=.
23464    for ac_exec_ext in '' $ac_executable_extensions; do
23465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23466    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23468    break 2
23469  fi
23470done
23471  done
23472IFS=$as_save_IFS
23473
23474  ;;
23475esac
23476fi
23477XATTR=$ac_cv_path_XATTR
23478if test -n "$XATTR"; then
23479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23480$as_echo "$XATTR" >&6; }
23481else
23482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23483$as_echo "no" >&6; }
23484fi
23485
23486
23487  test -n "$XATTR" && break
23488done
23489
23490    else
23491      # If it succeeded, then it was overridden by the user. We will use it
23492      # for the tool.
23493
23494      # First remove it from the list of overridden variables, so we can test
23495      # for unknown variables in the end.
23496      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23497
23498      # Check if we try to supply an empty value
23499      if test "x$XATTR" = x; then
23500        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23501$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23502        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23503$as_echo_n "checking for XATTR... " >&6; }
23504        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23505$as_echo "disabled" >&6; }
23506      else
23507        # Check if the provided tool contains a complete path.
23508        tool_specified="$XATTR"
23509        tool_basename="${tool_specified##*/}"
23510        if test "x$tool_basename" = "x$tool_specified"; then
23511          # A command without a complete path is provided, search $PATH.
23512          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23513$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23514          # Extract the first word of "$tool_basename", so it can be a program name with args.
23515set dummy $tool_basename; ac_word=$2
23516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23517$as_echo_n "checking for $ac_word... " >&6; }
23518if ${ac_cv_path_XATTR+:} false; then :
23519  $as_echo_n "(cached) " >&6
23520else
23521  case $XATTR in
23522  [\\/]* | ?:[\\/]*)
23523  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23524  ;;
23525  *)
23526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23527for as_dir in $PATH
23528do
23529  IFS=$as_save_IFS
23530  test -z "$as_dir" && as_dir=.
23531    for ac_exec_ext in '' $ac_executable_extensions; do
23532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23533    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23535    break 2
23536  fi
23537done
23538  done
23539IFS=$as_save_IFS
23540
23541  ;;
23542esac
23543fi
23544XATTR=$ac_cv_path_XATTR
23545if test -n "$XATTR"; then
23546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23547$as_echo "$XATTR" >&6; }
23548else
23549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23550$as_echo "no" >&6; }
23551fi
23552
23553
23554          if test "x$XATTR" = x; then
23555            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23556          fi
23557        else
23558          # Otherwise we believe it is a complete path. Use it as it is.
23559          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23560$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23561          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23562$as_echo_n "checking for XATTR... " >&6; }
23563          if test ! -x "$tool_specified"; then
23564            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23565$as_echo "not found" >&6; }
23566            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23567          fi
23568          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23569$as_echo "$tool_specified" >&6; }
23570        fi
23571      fi
23572    fi
23573
23574  fi
23575
23576
23577
23578  if test "x$XATTR" = x; then
23579    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23580  fi
23581
23582
23583
23584
23585  # Publish this variable in the help.
23586
23587
23588  if [ -z "${CODESIGN+x}" ]; then
23589    # The variable is not set by user, try to locate tool using the code snippet
23590    for ac_prog in codesign
23591do
23592  # Extract the first word of "$ac_prog", so it can be a program name with args.
23593set dummy $ac_prog; ac_word=$2
23594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23595$as_echo_n "checking for $ac_word... " >&6; }
23596if ${ac_cv_path_CODESIGN+:} false; then :
23597  $as_echo_n "(cached) " >&6
23598else
23599  case $CODESIGN in
23600  [\\/]* | ?:[\\/]*)
23601  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23602  ;;
23603  *)
23604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23605for as_dir in $PATH
23606do
23607  IFS=$as_save_IFS
23608  test -z "$as_dir" && as_dir=.
23609    for ac_exec_ext in '' $ac_executable_extensions; do
23610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23611    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23613    break 2
23614  fi
23615done
23616  done
23617IFS=$as_save_IFS
23618
23619  ;;
23620esac
23621fi
23622CODESIGN=$ac_cv_path_CODESIGN
23623if test -n "$CODESIGN"; then
23624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23625$as_echo "$CODESIGN" >&6; }
23626else
23627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23628$as_echo "no" >&6; }
23629fi
23630
23631
23632  test -n "$CODESIGN" && break
23633done
23634
23635  else
23636    # The variable is set, but is it from the command line or the environment?
23637
23638    # Try to remove the string !CODESIGN! from our list.
23639    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23640    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23641      # If it failed, the variable was not from the command line. Ignore it,
23642      # but warn the user (except for BASH, which is always set by the calling BASH).
23643      if test "xCODESIGN" != xBASH; then
23644        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23645$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23646      fi
23647      # Try to locate tool using the code snippet
23648      for ac_prog in codesign
23649do
23650  # Extract the first word of "$ac_prog", so it can be a program name with args.
23651set dummy $ac_prog; ac_word=$2
23652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23653$as_echo_n "checking for $ac_word... " >&6; }
23654if ${ac_cv_path_CODESIGN+:} false; then :
23655  $as_echo_n "(cached) " >&6
23656else
23657  case $CODESIGN in
23658  [\\/]* | ?:[\\/]*)
23659  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23660  ;;
23661  *)
23662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23663for as_dir in $PATH
23664do
23665  IFS=$as_save_IFS
23666  test -z "$as_dir" && as_dir=.
23667    for ac_exec_ext in '' $ac_executable_extensions; do
23668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23669    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23671    break 2
23672  fi
23673done
23674  done
23675IFS=$as_save_IFS
23676
23677  ;;
23678esac
23679fi
23680CODESIGN=$ac_cv_path_CODESIGN
23681if test -n "$CODESIGN"; then
23682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23683$as_echo "$CODESIGN" >&6; }
23684else
23685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23686$as_echo "no" >&6; }
23687fi
23688
23689
23690  test -n "$CODESIGN" && break
23691done
23692
23693    else
23694      # If it succeeded, then it was overridden by the user. We will use it
23695      # for the tool.
23696
23697      # First remove it from the list of overridden variables, so we can test
23698      # for unknown variables in the end.
23699      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23700
23701      # Check if we try to supply an empty value
23702      if test "x$CODESIGN" = x; then
23703        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23704$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23705        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23706$as_echo_n "checking for CODESIGN... " >&6; }
23707        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23708$as_echo "disabled" >&6; }
23709      else
23710        # Check if the provided tool contains a complete path.
23711        tool_specified="$CODESIGN"
23712        tool_basename="${tool_specified##*/}"
23713        if test "x$tool_basename" = "x$tool_specified"; then
23714          # A command without a complete path is provided, search $PATH.
23715          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23716$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23717          # Extract the first word of "$tool_basename", so it can be a program name with args.
23718set dummy $tool_basename; ac_word=$2
23719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23720$as_echo_n "checking for $ac_word... " >&6; }
23721if ${ac_cv_path_CODESIGN+:} false; then :
23722  $as_echo_n "(cached) " >&6
23723else
23724  case $CODESIGN in
23725  [\\/]* | ?:[\\/]*)
23726  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23727  ;;
23728  *)
23729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23730for as_dir in $PATH
23731do
23732  IFS=$as_save_IFS
23733  test -z "$as_dir" && as_dir=.
23734    for ac_exec_ext in '' $ac_executable_extensions; do
23735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23736    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23738    break 2
23739  fi
23740done
23741  done
23742IFS=$as_save_IFS
23743
23744  ;;
23745esac
23746fi
23747CODESIGN=$ac_cv_path_CODESIGN
23748if test -n "$CODESIGN"; then
23749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23750$as_echo "$CODESIGN" >&6; }
23751else
23752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23753$as_echo "no" >&6; }
23754fi
23755
23756
23757          if test "x$CODESIGN" = x; then
23758            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23759          fi
23760        else
23761          # Otherwise we believe it is a complete path. Use it as it is.
23762          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23763$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23764          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23765$as_echo_n "checking for CODESIGN... " >&6; }
23766          if test ! -x "$tool_specified"; then
23767            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23768$as_echo "not found" >&6; }
23769            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23770          fi
23771          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23772$as_echo "$tool_specified" >&6; }
23773        fi
23774      fi
23775    fi
23776
23777  fi
23778
23779
23780    if test "x$CODESIGN" != "x"; then
23781      # Verify that the openjdk_codesign certificate is present
23782      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23783$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23784      $RM codesign-testfile
23785      $TOUCH codesign-testfile
23786      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23787      $RM codesign-testfile
23788      if test "x$CODESIGN" = x; then
23789        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23790$as_echo "no" >&6; }
23791      else
23792        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23793$as_echo "yes" >&6; }
23794      fi
23795    fi
23796
23797
23798
23799  # Publish this variable in the help.
23800
23801
23802  if [ -z "${SETFILE+x}" ]; then
23803    # The variable is not set by user, try to locate tool using the code snippet
23804    for ac_prog in SetFile
23805do
23806  # Extract the first word of "$ac_prog", so it can be a program name with args.
23807set dummy $ac_prog; ac_word=$2
23808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23809$as_echo_n "checking for $ac_word... " >&6; }
23810if ${ac_cv_path_SETFILE+:} false; then :
23811  $as_echo_n "(cached) " >&6
23812else
23813  case $SETFILE in
23814  [\\/]* | ?:[\\/]*)
23815  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23816  ;;
23817  *)
23818  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23819for as_dir in $PATH
23820do
23821  IFS=$as_save_IFS
23822  test -z "$as_dir" && as_dir=.
23823    for ac_exec_ext in '' $ac_executable_extensions; do
23824  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23825    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23826    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23827    break 2
23828  fi
23829done
23830  done
23831IFS=$as_save_IFS
23832
23833  ;;
23834esac
23835fi
23836SETFILE=$ac_cv_path_SETFILE
23837if test -n "$SETFILE"; then
23838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23839$as_echo "$SETFILE" >&6; }
23840else
23841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23842$as_echo "no" >&6; }
23843fi
23844
23845
23846  test -n "$SETFILE" && break
23847done
23848
23849  else
23850    # The variable is set, but is it from the command line or the environment?
23851
23852    # Try to remove the string !SETFILE! from our list.
23853    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23854    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23855      # If it failed, the variable was not from the command line. Ignore it,
23856      # but warn the user (except for BASH, which is always set by the calling BASH).
23857      if test "xSETFILE" != xBASH; then
23858        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23859$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23860      fi
23861      # Try to locate tool using the code snippet
23862      for ac_prog in SetFile
23863do
23864  # Extract the first word of "$ac_prog", so it can be a program name with args.
23865set dummy $ac_prog; ac_word=$2
23866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23867$as_echo_n "checking for $ac_word... " >&6; }
23868if ${ac_cv_path_SETFILE+:} false; then :
23869  $as_echo_n "(cached) " >&6
23870else
23871  case $SETFILE in
23872  [\\/]* | ?:[\\/]*)
23873  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23874  ;;
23875  *)
23876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23877for as_dir in $PATH
23878do
23879  IFS=$as_save_IFS
23880  test -z "$as_dir" && as_dir=.
23881    for ac_exec_ext in '' $ac_executable_extensions; do
23882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23883    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23885    break 2
23886  fi
23887done
23888  done
23889IFS=$as_save_IFS
23890
23891  ;;
23892esac
23893fi
23894SETFILE=$ac_cv_path_SETFILE
23895if test -n "$SETFILE"; then
23896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23897$as_echo "$SETFILE" >&6; }
23898else
23899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23900$as_echo "no" >&6; }
23901fi
23902
23903
23904  test -n "$SETFILE" && break
23905done
23906
23907    else
23908      # If it succeeded, then it was overridden by the user. We will use it
23909      # for the tool.
23910
23911      # First remove it from the list of overridden variables, so we can test
23912      # for unknown variables in the end.
23913      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23914
23915      # Check if we try to supply an empty value
23916      if test "x$SETFILE" = x; then
23917        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23918$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23919        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23920$as_echo_n "checking for SETFILE... " >&6; }
23921        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23922$as_echo "disabled" >&6; }
23923      else
23924        # Check if the provided tool contains a complete path.
23925        tool_specified="$SETFILE"
23926        tool_basename="${tool_specified##*/}"
23927        if test "x$tool_basename" = "x$tool_specified"; then
23928          # A command without a complete path is provided, search $PATH.
23929          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23930$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23931          # Extract the first word of "$tool_basename", so it can be a program name with args.
23932set dummy $tool_basename; ac_word=$2
23933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23934$as_echo_n "checking for $ac_word... " >&6; }
23935if ${ac_cv_path_SETFILE+:} false; then :
23936  $as_echo_n "(cached) " >&6
23937else
23938  case $SETFILE in
23939  [\\/]* | ?:[\\/]*)
23940  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23941  ;;
23942  *)
23943  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23944for as_dir in $PATH
23945do
23946  IFS=$as_save_IFS
23947  test -z "$as_dir" && as_dir=.
23948    for ac_exec_ext in '' $ac_executable_extensions; do
23949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23950    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23952    break 2
23953  fi
23954done
23955  done
23956IFS=$as_save_IFS
23957
23958  ;;
23959esac
23960fi
23961SETFILE=$ac_cv_path_SETFILE
23962if test -n "$SETFILE"; then
23963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23964$as_echo "$SETFILE" >&6; }
23965else
23966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23967$as_echo "no" >&6; }
23968fi
23969
23970
23971          if test "x$SETFILE" = x; then
23972            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23973          fi
23974        else
23975          # Otherwise we believe it is a complete path. Use it as it is.
23976          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
23977$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
23978          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23979$as_echo_n "checking for SETFILE... " >&6; }
23980          if test ! -x "$tool_specified"; then
23981            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23982$as_echo "not found" >&6; }
23983            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
23984          fi
23985          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23986$as_echo "$tool_specified" >&6; }
23987        fi
23988      fi
23989    fi
23990
23991  fi
23992
23993
23994
23995  if test "x$SETFILE" = x; then
23996    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
23997  fi
23998
23999
24000  fi
24001
24002
24003  # Test if bash supports pipefail.
24004  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24005$as_echo_n "checking if bash supports pipefail... " >&6; }
24006  if ${BASH} -c 'set -o pipefail'; then
24007    BASH_ARGS="$BASH_ARGS -o pipefail"
24008    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24009$as_echo "yes" >&6; }
24010  else
24011    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24012$as_echo "no" >&6; }
24013  fi
24014
24015  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24016$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24017  if ${BASH} -e -c 'true'; then
24018    BASH_ARGS="$BASH_ARGS -e"
24019    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24020$as_echo "yes" >&6; }
24021  else
24022    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24023$as_echo "no" >&6; }
24024  fi
24025
24026
24027
24028
24029# Check if pkg-config is available.
24030
24031
24032if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24033	if test -n "$ac_tool_prefix"; then
24034  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24035set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24037$as_echo_n "checking for $ac_word... " >&6; }
24038if ${ac_cv_path_PKG_CONFIG+:} false; then :
24039  $as_echo_n "(cached) " >&6
24040else
24041  case $PKG_CONFIG in
24042  [\\/]* | ?:[\\/]*)
24043  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24044  ;;
24045  *)
24046  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24047for as_dir in $PATH
24048do
24049  IFS=$as_save_IFS
24050  test -z "$as_dir" && as_dir=.
24051    for ac_exec_ext in '' $ac_executable_extensions; do
24052  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24053    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24054    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24055    break 2
24056  fi
24057done
24058  done
24059IFS=$as_save_IFS
24060
24061  ;;
24062esac
24063fi
24064PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24065if test -n "$PKG_CONFIG"; then
24066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24067$as_echo "$PKG_CONFIG" >&6; }
24068else
24069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24070$as_echo "no" >&6; }
24071fi
24072
24073
24074fi
24075if test -z "$ac_cv_path_PKG_CONFIG"; then
24076  ac_pt_PKG_CONFIG=$PKG_CONFIG
24077  # Extract the first word of "pkg-config", so it can be a program name with args.
24078set dummy pkg-config; ac_word=$2
24079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24080$as_echo_n "checking for $ac_word... " >&6; }
24081if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24082  $as_echo_n "(cached) " >&6
24083else
24084  case $ac_pt_PKG_CONFIG in
24085  [\\/]* | ?:[\\/]*)
24086  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24087  ;;
24088  *)
24089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24090for as_dir in $PATH
24091do
24092  IFS=$as_save_IFS
24093  test -z "$as_dir" && as_dir=.
24094    for ac_exec_ext in '' $ac_executable_extensions; do
24095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24096    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24098    break 2
24099  fi
24100done
24101  done
24102IFS=$as_save_IFS
24103
24104  ;;
24105esac
24106fi
24107ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24108if test -n "$ac_pt_PKG_CONFIG"; then
24109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24110$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24111else
24112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24113$as_echo "no" >&6; }
24114fi
24115
24116  if test "x$ac_pt_PKG_CONFIG" = x; then
24117    PKG_CONFIG=""
24118  else
24119    case $cross_compiling:$ac_tool_warned in
24120yes:)
24121{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24122$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24123ac_tool_warned=yes ;;
24124esac
24125    PKG_CONFIG=$ac_pt_PKG_CONFIG
24126  fi
24127else
24128  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24129fi
24130
24131fi
24132if test -n "$PKG_CONFIG"; then
24133	_pkg_min_version=0.9.0
24134	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24135$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24136	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24137		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24138$as_echo "yes" >&6; }
24139	else
24140		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24141$as_echo "no" >&6; }
24142		PKG_CONFIG=""
24143	fi
24144
24145fi
24146
24147# After basic tools have been setup, we can check build os specific details.
24148
24149  ###############################################################################
24150
24151  # Note that this is the build platform OS version!
24152
24153  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24154  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24155  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24156  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24157
24158
24159
24160
24161
24162# Misc basic settings
24163
24164
24165# Check whether --with-default-make-target was given.
24166if test "${with_default_make_target+set}" = set; then :
24167  withval=$with_default_make_target;
24168fi
24169
24170  if test "x$with_default_make_target" = "x" \
24171      || test "x$with_default_make_target" = "xyes"; then
24172    DEFAULT_MAKE_TARGET="exploded-image"
24173  elif test "x$with_default_make_target" = "xno"; then
24174    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24175  else
24176    DEFAULT_MAKE_TARGET="$with_default_make_target"
24177  fi
24178
24179
24180
24181
24182###############################################################################
24183#
24184# Determine OpenJDK variants, options and version numbers.
24185#
24186###############################################################################
24187
24188# We need build & target for this.
24189
24190  # Should we build a JDK without a graphical UI?
24191  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24192$as_echo_n "checking headless only... " >&6; }
24193  # Check whether --enable-headless-only was given.
24194if test "${enable_headless_only+set}" = set; then :
24195  enableval=$enable_headless_only;
24196fi
24197
24198
24199  if test "x$enable_headless_only" = "xyes"; then
24200    ENABLE_HEADLESS_ONLY="true"
24201    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24202$as_echo "yes" >&6; }
24203  elif test "x$enable_headless_only" = "xno"; then
24204    ENABLE_HEADLESS_ONLY="false"
24205    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24206$as_echo "no" >&6; }
24207  elif test "x$enable_headless_only" = "x"; then
24208    ENABLE_HEADLESS_ONLY="false"
24209    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24210$as_echo "no" >&6; }
24211  else
24212    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24213  fi
24214
24215
24216
24217  # Choose cacerts source file
24218
24219# Check whether --with-cacerts-file was given.
24220if test "${with_cacerts_file+set}" = set; then :
24221  withval=$with_cacerts_file;
24222fi
24223
24224  if test "x$with_cacerts_file" != x; then
24225    CACERTS_FILE=$with_cacerts_file
24226  fi
24227
24228
24229  # Enable or disable unlimited crypto
24230  # Check whether --enable-unlimited-crypto was given.
24231if test "${enable_unlimited_crypto+set}" = set; then :
24232  enableval=$enable_unlimited_crypto;
24233else
24234  enable_unlimited_crypto=no
24235fi
24236
24237  if test "x$enable_unlimited_crypto" = "xyes"; then
24238    UNLIMITED_CRYPTO=true
24239  else
24240    UNLIMITED_CRYPTO=false
24241  fi
24242
24243
24244  # Should we build the serviceability agent (SA)?
24245  INCLUDE_SA=true
24246  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24247    INCLUDE_SA=false
24248  fi
24249  if test "x$OPENJDK_TARGET_OS" = xaix ; then
24250    INCLUDE_SA=false
24251  fi
24252
24253
24254  # Compress jars
24255  COMPRESS_JARS=false
24256
24257
24258
24259  # Setup default copyright year. Mostly overridden when building close to a new year.
24260
24261# Check whether --with-copyright-year was given.
24262if test "${with_copyright_year+set}" = set; then :
24263  withval=$with_copyright_year;
24264fi
24265
24266  if test "x$with_copyright_year" = xyes; then
24267    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24268  elif test "x$with_copyright_year" != x; then
24269    COPYRIGHT_YEAR="$with_copyright_year"
24270  else
24271    COPYRIGHT_YEAR=`$DATE +'%Y'`
24272  fi
24273
24274
24275
24276  # Check whether --enable-keep-packaged-modules was given.
24277if test "${enable_keep_packaged_modules+set}" = set; then :
24278  enableval=$enable_keep_packaged_modules;
24279fi
24280
24281
24282  if test "x$enable_keep_packaged_modules" = "xyes"; then
24283    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24284$as_echo_n "checking if packaged modules are kept... " >&6; }
24285    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24286$as_echo "yes" >&6; }
24287    JLINK_KEEP_PACKAGED_MODULES=true
24288  elif test "x$enable_keep_packaged_modules" = "xno"; then
24289    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24290$as_echo_n "checking if packaged modules are kept... " >&6; }
24291    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24292$as_echo "no" >&6; }
24293    JLINK_KEEP_PACKAGED_MODULES=false
24294  elif test "x$enable_keep_packaged_modules" = "x"; then
24295    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24296$as_echo "yes (default)" >&6; }
24297    JLINK_KEEP_PACKAGED_MODULES=true
24298  else
24299    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24300  fi
24301
24302
24303
24304
24305  # Warn user that old version arguments are deprecated.
24306
24307
24308# Check whether --with-milestone was given.
24309if test "${with_milestone+set}" = set; then :
24310  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24311$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24312fi
24313
24314
24315
24316
24317# Check whether --with-update-version was given.
24318if test "${with_update_version+set}" = set; then :
24319  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24320$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24321fi
24322
24323
24324
24325
24326# Check whether --with-user-release-suffix was given.
24327if test "${with_user_release_suffix+set}" = set; then :
24328  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
24329$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24330fi
24331
24332
24333
24334
24335# Check whether --with-build-number was given.
24336if test "${with_build_number+set}" = set; then :
24337  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24338$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24339fi
24340
24341
24342
24343  # Source the version numbers file
24344  . $AUTOCONF_DIR/version-numbers
24345
24346  # Some non-version number information is set in that file
24347
24348
24349
24350
24351
24352
24353
24354
24355
24356  # Override version from arguments
24357
24358  # If --with-version-string is set, process it first. It is possible to
24359  # override parts with more specific flags, since these are processed later.
24360
24361# Check whether --with-version-string was given.
24362if test "${with_version_string+set}" = set; then :
24363  withval=$with_version_string;
24364fi
24365
24366  if test "x$with_version_string" = xyes; then
24367    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24368  elif test "x$with_version_string" != x; then
24369    # Additional [] needed to keep m4 from mangling shell constructs.
24370    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24371      VERSION_MAJOR=${BASH_REMATCH[1]}
24372      VERSION_MINOR=${BASH_REMATCH[3]}
24373      VERSION_SECURITY=${BASH_REMATCH[5]}
24374      VERSION_PATCH=${BASH_REMATCH[7]}
24375      VERSION_PRE=${BASH_REMATCH[9]}
24376      version_plus_separator=${BASH_REMATCH[11]}
24377      VERSION_BUILD=${BASH_REMATCH[12]}
24378      VERSION_OPT=${BASH_REMATCH[14]}
24379      # Unspecified numerical fields are interpreted as 0.
24380      if test "x$VERSION_MINOR" = x; then
24381        VERSION_MINOR=0
24382      fi
24383      if test "x$VERSION_SECURITY" = x; then
24384        VERSION_SECURITY=0
24385      fi
24386      if test "x$VERSION_PATCH" = x; then
24387        VERSION_PATCH=0
24388      fi
24389      if test "x$version_plus_separator" != x \
24390          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24391        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24392      fi
24393      # Stop the version part process from setting default values.
24394      # We still allow them to explicitely override though.
24395      NO_DEFAULT_VERSION_PARTS=true
24396    else
24397      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24398    fi
24399  fi
24400
24401
24402# Check whether --with-version-pre was given.
24403if test "${with_version_pre+set}" = set; then :
24404  withval=$with_version_pre; with_version_pre_present=true
24405else
24406  with_version_pre_present=false
24407fi
24408
24409
24410  if test "x$with_version_pre_present" = xtrue; then
24411    if test "x$with_version_pre" = xyes; then
24412      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24413    elif test "x$with_version_pre" = xno; then
24414      # Interpret --without-* as empty string instead of the literal "no"
24415      VERSION_PRE=
24416    else
24417      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24418       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24419      if test "x$VERSION_PRE" != "x$with_version_pre"; then
24420        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24421$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24422      fi
24423    fi
24424  else
24425    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24426      # Default is to use "internal" as pre
24427      VERSION_PRE="internal"
24428    fi
24429  fi
24430
24431
24432# Check whether --with-version-opt was given.
24433if test "${with_version_opt+set}" = set; then :
24434  withval=$with_version_opt; with_version_opt_present=true
24435else
24436  with_version_opt_present=false
24437fi
24438
24439
24440  if test "x$with_version_opt_present" = xtrue; then
24441    if test "x$with_version_opt" = xyes; then
24442      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24443    elif test "x$with_version_opt" = xno; then
24444      # Interpret --without-* as empty string instead of the literal "no"
24445      VERSION_OPT=
24446    else
24447      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24448       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24449      if test "x$VERSION_OPT" != "x$with_version_opt"; then
24450        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24451$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24452      fi
24453    fi
24454  else
24455    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24456      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
24457      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
24458      # Outer [ ] to quote m4.
24459       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24460      VERSION_OPT="$timestamp.$USERNAME.$basedirname"
24461    fi
24462  fi
24463
24464
24465# Check whether --with-version-build was given.
24466if test "${with_version_build+set}" = set; then :
24467  withval=$with_version_build; with_version_build_present=true
24468else
24469  with_version_build_present=false
24470fi
24471
24472
24473  if test "x$with_version_build_present" = xtrue; then
24474    if test "x$with_version_build" = xyes; then
24475      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24476    elif test "x$with_version_build" = xno; then
24477      # Interpret --without-* as empty string instead of the literal "no"
24478      VERSION_BUILD=
24479    elif test "x$with_version_build" = x; then
24480      VERSION_BUILD=
24481    else
24482
24483  # Additional [] needed to keep m4 from mangling shell constructs.
24484  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24485    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24486  fi
24487  # Extract the version number without leading zeros.
24488  cleaned_value=${BASH_REMATCH[1]}
24489  if test "x$cleaned_value" = x; then
24490    # Special case for zero
24491    cleaned_value=${BASH_REMATCH[2]}
24492  fi
24493
24494  if test $cleaned_value -gt 255; then
24495    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24496  fi
24497  if test "x$cleaned_value" != "x$with_version_build"; then
24498    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24499$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24500  fi
24501  VERSION_BUILD=$cleaned_value
24502
24503    fi
24504  else
24505    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24506      # Default is to not have a build number.
24507      VERSION_BUILD=""
24508      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24509      VERSION_BUILD=0
24510    fi
24511  fi
24512
24513
24514# Check whether --with-version-major was given.
24515if test "${with_version_major+set}" = set; then :
24516  withval=$with_version_major; with_version_major_present=true
24517else
24518  with_version_major_present=false
24519fi
24520
24521
24522  if test "x$with_version_major_present" = xtrue; then
24523    if test "x$with_version_major" = xyes; then
24524      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24525    else
24526
24527  # Additional [] needed to keep m4 from mangling shell constructs.
24528  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24529    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24530  fi
24531  # Extract the version number without leading zeros.
24532  cleaned_value=${BASH_REMATCH[1]}
24533  if test "x$cleaned_value" = x; then
24534    # Special case for zero
24535    cleaned_value=${BASH_REMATCH[2]}
24536  fi
24537
24538  if test $cleaned_value -gt 255; then
24539    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24540  fi
24541  if test "x$cleaned_value" != "x$with_version_major"; then
24542    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24543$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24544  fi
24545  VERSION_MAJOR=$cleaned_value
24546
24547    fi
24548  else
24549    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24550      # Default is to get value from version-numbers
24551      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24552    fi
24553  fi
24554
24555
24556# Check whether --with-version-minor was given.
24557if test "${with_version_minor+set}" = set; then :
24558  withval=$with_version_minor; with_version_minor_present=true
24559else
24560  with_version_minor_present=false
24561fi
24562
24563
24564  if test "x$with_version_minor_present" = xtrue; then
24565    if test "x$with_version_minor" = xyes; then
24566      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24567    elif test "x$with_version_minor" = xno; then
24568      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24569      VERSION_MINOR=0
24570    elif test "x$with_version_minor" = x; then
24571      VERSION_MINOR=0
24572    else
24573
24574  # Additional [] needed to keep m4 from mangling shell constructs.
24575  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24576    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24577  fi
24578  # Extract the version number without leading zeros.
24579  cleaned_value=${BASH_REMATCH[1]}
24580  if test "x$cleaned_value" = x; then
24581    # Special case for zero
24582    cleaned_value=${BASH_REMATCH[2]}
24583  fi
24584
24585  if test $cleaned_value -gt 255; then
24586    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24587  fi
24588  if test "x$cleaned_value" != "x$with_version_minor"; then
24589    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24590$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24591  fi
24592  VERSION_MINOR=$cleaned_value
24593
24594    fi
24595  else
24596    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24597      # Default is 0, if unspecified
24598      VERSION_MINOR=0
24599    fi
24600  fi
24601
24602
24603# Check whether --with-version-security was given.
24604if test "${with_version_security+set}" = set; then :
24605  withval=$with_version_security; with_version_security_present=true
24606else
24607  with_version_security_present=false
24608fi
24609
24610
24611  if test "x$with_version_security_present" = xtrue; then
24612    if test "x$with_version_security" = xyes; then
24613      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24614    elif test "x$with_version_security" = xno; then
24615      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24616      VERSION_SECURITY=0
24617    elif test "x$with_version_security" = x; then
24618      VERSION_SECURITY=0
24619    else
24620
24621  # Additional [] needed to keep m4 from mangling shell constructs.
24622  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24623    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24624  fi
24625  # Extract the version number without leading zeros.
24626  cleaned_value=${BASH_REMATCH[1]}
24627  if test "x$cleaned_value" = x; then
24628    # Special case for zero
24629    cleaned_value=${BASH_REMATCH[2]}
24630  fi
24631
24632  if test $cleaned_value -gt 255; then
24633    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24634  fi
24635  if test "x$cleaned_value" != "x$with_version_security"; then
24636    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24637$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24638  fi
24639  VERSION_SECURITY=$cleaned_value
24640
24641    fi
24642  else
24643    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24644      # Default is 0, if unspecified
24645      VERSION_SECURITY=0
24646    fi
24647  fi
24648
24649
24650# Check whether --with-version-patch was given.
24651if test "${with_version_patch+set}" = set; then :
24652  withval=$with_version_patch; with_version_patch_present=true
24653else
24654  with_version_patch_present=false
24655fi
24656
24657
24658  if test "x$with_version_patch_present" = xtrue; then
24659    if test "x$with_version_patch" = xyes; then
24660      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24661    elif test "x$with_version_patch" = xno; then
24662      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24663      VERSION_PATCH=0
24664    elif test "x$with_version_patch" = x; then
24665      VERSION_PATCH=0
24666    else
24667
24668  # Additional [] needed to keep m4 from mangling shell constructs.
24669  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24670    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24671  fi
24672  # Extract the version number without leading zeros.
24673  cleaned_value=${BASH_REMATCH[1]}
24674  if test "x$cleaned_value" = x; then
24675    # Special case for zero
24676    cleaned_value=${BASH_REMATCH[2]}
24677  fi
24678
24679  if test $cleaned_value -gt 255; then
24680    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24681  fi
24682  if test "x$cleaned_value" != "x$with_version_patch"; then
24683    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24684$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24685  fi
24686  VERSION_PATCH=$cleaned_value
24687
24688    fi
24689  else
24690    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24691      # Default is 0, if unspecified
24692      VERSION_PATCH=0
24693    fi
24694  fi
24695
24696  # Calculate derived version properties
24697
24698  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24699  if test "x$VERSION_PRE" = x; then
24700    VERSION_IS_GA=true
24701  else
24702    VERSION_IS_GA=false
24703  fi
24704
24705  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24706  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24707
24708  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24709  # Strip trailing zeroes from stripped_version_number
24710  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24711  VERSION_NUMBER=$stripped_version_number
24712
24713  # The complete version string, with additional build information
24714  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24715    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24716  else
24717    # If either build or opt is set, we need a + separator
24718    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24719  fi
24720
24721  # The short version string, just VERSION_NUMBER and PRE, if present.
24722  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24723
24724  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24725$as_echo_n "checking for version string... " >&6; }
24726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24727$as_echo "$VERSION_STRING" >&6; }
24728
24729
24730
24731
24732
24733
24734
24735
24736
24737
24738
24739
24740
24741
24742
24743###############################################################################
24744#
24745# Setup BootJDK, used to bootstrap the build.
24746#
24747###############################################################################
24748
24749
24750  BOOT_JDK_FOUND=no
24751
24752# Check whether --with-boot-jdk was given.
24753if test "${with_boot_jdk+set}" = set; then :
24754  withval=$with_boot_jdk;
24755fi
24756
24757
24758  # We look for the Boot JDK through various means, going from more certain to
24759  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24760  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24761  # must check if this is indeed valid; otherwise we'll continue looking.
24762
24763  # Test: Is bootjdk explicitely set by command line arguments?
24764
24765  if test "x$BOOT_JDK_FOUND" = xno; then
24766    # Now execute the test
24767
24768  if test "x$with_boot_jdk" != x; then
24769    BOOT_JDK=$with_boot_jdk
24770    BOOT_JDK_FOUND=maybe
24771    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24772$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24773  fi
24774
24775
24776    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24777    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24778      # Do we have a bin/java?
24779      if test ! -x "$BOOT_JDK/bin/java"; then
24780        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24781$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24782        BOOT_JDK_FOUND=no
24783      else
24784        # Do we have a bin/javac?
24785        if test ! -x "$BOOT_JDK/bin/javac"; then
24786          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24787$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24788          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24789$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24790          BOOT_JDK_FOUND=no
24791        else
24792          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24793          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24794
24795          # Extra M4 quote needed to protect [] in grep expression.
24796          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24797          if test "x$FOUND_CORRECT_VERSION" = x; then
24798            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24799$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24800            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24801$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24802            BOOT_JDK_FOUND=no
24803          else
24804            # We're done! :-)
24805            BOOT_JDK_FOUND=yes
24806
24807  # Only process if variable expands to non-empty
24808
24809  if test "x$BOOT_JDK" != x; then
24810    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24811
24812  # Input might be given as Windows format, start by converting to
24813  # unix format.
24814  path="$BOOT_JDK"
24815  new_path=`$CYGPATH -u "$path"`
24816
24817  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24818  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24819  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24820  # "foo.exe" is OK but "foo" is an error.
24821  #
24822  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24823  # It is also a way to make sure we got the proper file name for the real test later on.
24824  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24825  if test "x$test_shortpath" = x; then
24826    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24827$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24828    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24829  fi
24830
24831  # Call helper function which possibly converts this using DOS-style short mode.
24832  # If so, the updated path is stored in $new_path.
24833
24834  input_path="$new_path"
24835  # Check if we need to convert this using DOS-style short mode. If the path
24836  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24837  # take no chances and rewrite it.
24838  # Note: m4 eats our [], so we need to use [ and ] instead.
24839  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24840  if test "x$has_forbidden_chars" != x; then
24841    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24842    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24843    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24844    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24845      # Going to short mode and back again did indeed matter. Since short mode is
24846      # case insensitive, let's make it lowercase to improve readability.
24847      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24848      # Now convert it back to Unix-style (cygpath)
24849      input_path=`$CYGPATH -u "$shortmode_path"`
24850      new_path="$input_path"
24851    fi
24852  fi
24853
24854  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24855  if test "x$test_cygdrive_prefix" = x; then
24856    # As a simple fix, exclude /usr/bin since it's not a real path.
24857    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24858      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24859      # a path prefixed by /cygdrive for fixpath to work.
24860      new_path="$CYGWIN_ROOT_PATH$input_path"
24861    fi
24862  fi
24863
24864
24865  if test "x$path" != "x$new_path"; then
24866    BOOT_JDK="$new_path"
24867    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24868$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24869  fi
24870
24871    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24872
24873  path="$BOOT_JDK"
24874  has_colon=`$ECHO $path | $GREP ^.:`
24875  new_path="$path"
24876  if test "x$has_colon" = x; then
24877    # Not in mixed or Windows style, start by that.
24878    new_path=`cmd //c echo $path`
24879  fi
24880
24881
24882  input_path="$new_path"
24883  # Check if we need to convert this using DOS-style short mode. If the path
24884  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24885  # take no chances and rewrite it.
24886  # Note: m4 eats our [], so we need to use [ and ] instead.
24887  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24888  if test "x$has_forbidden_chars" != x; then
24889    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24890    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24891  fi
24892
24893
24894  windows_path="$new_path"
24895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24896    unix_path=`$CYGPATH -u "$windows_path"`
24897    new_path="$unix_path"
24898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24900    new_path="$unix_path"
24901  fi
24902
24903  if test "x$path" != "x$new_path"; then
24904    BOOT_JDK="$new_path"
24905    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24906$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24907  fi
24908
24909  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24910  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24911
24912    else
24913      # We're on a unix platform. Hooray! :)
24914      path="$BOOT_JDK"
24915      has_space=`$ECHO "$path" | $GREP " "`
24916      if test "x$has_space" != x; then
24917        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24918$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24919        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24920      fi
24921
24922      # Use eval to expand a potential ~
24923      eval path="$path"
24924      if test ! -f "$path" && test ! -d "$path"; then
24925        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24926      fi
24927
24928      if test -d "$path"; then
24929        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24930      else
24931        dir="`$DIRNAME "$path"`"
24932        base="`$BASENAME "$path"`"
24933        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24934      fi
24935    fi
24936  fi
24937
24938            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24939$as_echo_n "checking for Boot JDK... " >&6; }
24940            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24941$as_echo "$BOOT_JDK" >&6; }
24942            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24943$as_echo_n "checking Boot JDK version... " >&6; }
24944            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24945            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24946$as_echo "$BOOT_JDK_VERSION" >&6; }
24947          fi # end check jdk version
24948        fi # end check javac
24949      fi # end check java
24950    fi # end check boot jdk found
24951  fi
24952
24953  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
24954    # Having specified an argument which is incorrect will produce an instant failure;
24955    # we should not go on looking
24956    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
24957  fi
24958
24959  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
24960
24961  if test "x$BOOT_JDK_FOUND" = xno; then
24962    # Now execute the test
24963
24964  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
24965    # First check at user selected default
24966
24967  if test "x$BOOT_JDK_FOUND" = xno; then
24968    # Now execute the test
24969
24970  if test -x /usr/libexec/java_home; then
24971    BOOT_JDK=`/usr/libexec/java_home `
24972    BOOT_JDK_FOUND=maybe
24973    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
24974$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
24975  fi
24976
24977
24978    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24979    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24980      # Do we have a bin/java?
24981      if test ! -x "$BOOT_JDK/bin/java"; then
24982        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24983$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24984        BOOT_JDK_FOUND=no
24985      else
24986        # Do we have a bin/javac?
24987        if test ! -x "$BOOT_JDK/bin/javac"; then
24988          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24989$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24990          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24991$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24992          BOOT_JDK_FOUND=no
24993        else
24994          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24995          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24996
24997          # Extra M4 quote needed to protect [] in grep expression.
24998          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24999          if test "x$FOUND_CORRECT_VERSION" = x; then
25000            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25001$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25002            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25003$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25004            BOOT_JDK_FOUND=no
25005          else
25006            # We're done! :-)
25007            BOOT_JDK_FOUND=yes
25008
25009  # Only process if variable expands to non-empty
25010
25011  if test "x$BOOT_JDK" != x; then
25012    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25013
25014  # Input might be given as Windows format, start by converting to
25015  # unix format.
25016  path="$BOOT_JDK"
25017  new_path=`$CYGPATH -u "$path"`
25018
25019  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25020  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25021  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25022  # "foo.exe" is OK but "foo" is an error.
25023  #
25024  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25025  # It is also a way to make sure we got the proper file name for the real test later on.
25026  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25027  if test "x$test_shortpath" = x; then
25028    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25029$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25030    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25031  fi
25032
25033  # Call helper function which possibly converts this using DOS-style short mode.
25034  # If so, the updated path is stored in $new_path.
25035
25036  input_path="$new_path"
25037  # Check if we need to convert this using DOS-style short mode. If the path
25038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25039  # take no chances and rewrite it.
25040  # Note: m4 eats our [], so we need to use [ and ] instead.
25041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25042  if test "x$has_forbidden_chars" != x; then
25043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25044    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25045    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25046    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25047      # Going to short mode and back again did indeed matter. Since short mode is
25048      # case insensitive, let's make it lowercase to improve readability.
25049      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25050      # Now convert it back to Unix-style (cygpath)
25051      input_path=`$CYGPATH -u "$shortmode_path"`
25052      new_path="$input_path"
25053    fi
25054  fi
25055
25056  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25057  if test "x$test_cygdrive_prefix" = x; then
25058    # As a simple fix, exclude /usr/bin since it's not a real path.
25059    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25060      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25061      # a path prefixed by /cygdrive for fixpath to work.
25062      new_path="$CYGWIN_ROOT_PATH$input_path"
25063    fi
25064  fi
25065
25066
25067  if test "x$path" != "x$new_path"; then
25068    BOOT_JDK="$new_path"
25069    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25070$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25071  fi
25072
25073    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25074
25075  path="$BOOT_JDK"
25076  has_colon=`$ECHO $path | $GREP ^.:`
25077  new_path="$path"
25078  if test "x$has_colon" = x; then
25079    # Not in mixed or Windows style, start by that.
25080    new_path=`cmd //c echo $path`
25081  fi
25082
25083
25084  input_path="$new_path"
25085  # Check if we need to convert this using DOS-style short mode. If the path
25086  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25087  # take no chances and rewrite it.
25088  # Note: m4 eats our [], so we need to use [ and ] instead.
25089  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25090  if test "x$has_forbidden_chars" != x; then
25091    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25092    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25093  fi
25094
25095
25096  windows_path="$new_path"
25097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25098    unix_path=`$CYGPATH -u "$windows_path"`
25099    new_path="$unix_path"
25100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25102    new_path="$unix_path"
25103  fi
25104
25105  if test "x$path" != "x$new_path"; then
25106    BOOT_JDK="$new_path"
25107    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25108$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25109  fi
25110
25111  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25112  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25113
25114    else
25115      # We're on a unix platform. Hooray! :)
25116      path="$BOOT_JDK"
25117      has_space=`$ECHO "$path" | $GREP " "`
25118      if test "x$has_space" != x; then
25119        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25120$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25121        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25122      fi
25123
25124      # Use eval to expand a potential ~
25125      eval path="$path"
25126      if test ! -f "$path" && test ! -d "$path"; then
25127        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25128      fi
25129
25130      if test -d "$path"; then
25131        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25132      else
25133        dir="`$DIRNAME "$path"`"
25134        base="`$BASENAME "$path"`"
25135        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25136      fi
25137    fi
25138  fi
25139
25140            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25141$as_echo_n "checking for Boot JDK... " >&6; }
25142            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25143$as_echo "$BOOT_JDK" >&6; }
25144            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25145$as_echo_n "checking Boot JDK version... " >&6; }
25146            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25147            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25148$as_echo "$BOOT_JDK_VERSION" >&6; }
25149          fi # end check jdk version
25150        fi # end check javac
25151      fi # end check java
25152    fi # end check boot jdk found
25153  fi
25154
25155    # If that did not work out (e.g. too old), try explicit versions instead
25156
25157  if test "x$BOOT_JDK_FOUND" = xno; then
25158    # Now execute the test
25159
25160  if test -x /usr/libexec/java_home; then
25161    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25162    BOOT_JDK_FOUND=maybe
25163    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25164$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25165  fi
25166
25167
25168    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25169    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25170      # Do we have a bin/java?
25171      if test ! -x "$BOOT_JDK/bin/java"; then
25172        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25173$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25174        BOOT_JDK_FOUND=no
25175      else
25176        # Do we have a bin/javac?
25177        if test ! -x "$BOOT_JDK/bin/javac"; then
25178          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25179$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25180          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25181$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25182          BOOT_JDK_FOUND=no
25183        else
25184          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25185          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25186
25187          # Extra M4 quote needed to protect [] in grep expression.
25188          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25189          if test "x$FOUND_CORRECT_VERSION" = x; then
25190            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25191$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25192            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25193$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25194            BOOT_JDK_FOUND=no
25195          else
25196            # We're done! :-)
25197            BOOT_JDK_FOUND=yes
25198
25199  # Only process if variable expands to non-empty
25200
25201  if test "x$BOOT_JDK" != x; then
25202    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25203
25204  # Input might be given as Windows format, start by converting to
25205  # unix format.
25206  path="$BOOT_JDK"
25207  new_path=`$CYGPATH -u "$path"`
25208
25209  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25210  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25211  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25212  # "foo.exe" is OK but "foo" is an error.
25213  #
25214  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25215  # It is also a way to make sure we got the proper file name for the real test later on.
25216  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25217  if test "x$test_shortpath" = x; then
25218    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25219$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25220    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25221  fi
25222
25223  # Call helper function which possibly converts this using DOS-style short mode.
25224  # If so, the updated path is stored in $new_path.
25225
25226  input_path="$new_path"
25227  # Check if we need to convert this using DOS-style short mode. If the path
25228  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25229  # take no chances and rewrite it.
25230  # Note: m4 eats our [], so we need to use [ and ] instead.
25231  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25232  if test "x$has_forbidden_chars" != x; then
25233    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25234    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25235    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25236    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25237      # Going to short mode and back again did indeed matter. Since short mode is
25238      # case insensitive, let's make it lowercase to improve readability.
25239      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25240      # Now convert it back to Unix-style (cygpath)
25241      input_path=`$CYGPATH -u "$shortmode_path"`
25242      new_path="$input_path"
25243    fi
25244  fi
25245
25246  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25247  if test "x$test_cygdrive_prefix" = x; then
25248    # As a simple fix, exclude /usr/bin since it's not a real path.
25249    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25250      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25251      # a path prefixed by /cygdrive for fixpath to work.
25252      new_path="$CYGWIN_ROOT_PATH$input_path"
25253    fi
25254  fi
25255
25256
25257  if test "x$path" != "x$new_path"; then
25258    BOOT_JDK="$new_path"
25259    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25260$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25261  fi
25262
25263    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25264
25265  path="$BOOT_JDK"
25266  has_colon=`$ECHO $path | $GREP ^.:`
25267  new_path="$path"
25268  if test "x$has_colon" = x; then
25269    # Not in mixed or Windows style, start by that.
25270    new_path=`cmd //c echo $path`
25271  fi
25272
25273
25274  input_path="$new_path"
25275  # Check if we need to convert this using DOS-style short mode. If the path
25276  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25277  # take no chances and rewrite it.
25278  # Note: m4 eats our [], so we need to use [ and ] instead.
25279  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25280  if test "x$has_forbidden_chars" != x; then
25281    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25282    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25283  fi
25284
25285
25286  windows_path="$new_path"
25287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25288    unix_path=`$CYGPATH -u "$windows_path"`
25289    new_path="$unix_path"
25290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25291    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25292    new_path="$unix_path"
25293  fi
25294
25295  if test "x$path" != "x$new_path"; then
25296    BOOT_JDK="$new_path"
25297    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25298$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25299  fi
25300
25301  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25302  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25303
25304    else
25305      # We're on a unix platform. Hooray! :)
25306      path="$BOOT_JDK"
25307      has_space=`$ECHO "$path" | $GREP " "`
25308      if test "x$has_space" != x; then
25309        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25310$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25311        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25312      fi
25313
25314      # Use eval to expand a potential ~
25315      eval path="$path"
25316      if test ! -f "$path" && test ! -d "$path"; then
25317        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25318      fi
25319
25320      if test -d "$path"; then
25321        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25322      else
25323        dir="`$DIRNAME "$path"`"
25324        base="`$BASENAME "$path"`"
25325        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25326      fi
25327    fi
25328  fi
25329
25330            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25331$as_echo_n "checking for Boot JDK... " >&6; }
25332            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25333$as_echo "$BOOT_JDK" >&6; }
25334            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25335$as_echo_n "checking Boot JDK version... " >&6; }
25336            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25337            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25338$as_echo "$BOOT_JDK_VERSION" >&6; }
25339          fi # end check jdk version
25340        fi # end check javac
25341      fi # end check java
25342    fi # end check boot jdk found
25343  fi
25344
25345
25346  if test "x$BOOT_JDK_FOUND" = xno; then
25347    # Now execute the test
25348
25349  if test -x /usr/libexec/java_home; then
25350    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25351    BOOT_JDK_FOUND=maybe
25352    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25353$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25354  fi
25355
25356
25357    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25358    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25359      # Do we have a bin/java?
25360      if test ! -x "$BOOT_JDK/bin/java"; then
25361        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25362$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25363        BOOT_JDK_FOUND=no
25364      else
25365        # Do we have a bin/javac?
25366        if test ! -x "$BOOT_JDK/bin/javac"; then
25367          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25368$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25369          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25370$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25371          BOOT_JDK_FOUND=no
25372        else
25373          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25374          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25375
25376          # Extra M4 quote needed to protect [] in grep expression.
25377          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25378          if test "x$FOUND_CORRECT_VERSION" = x; then
25379            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25380$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25381            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25382$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25383            BOOT_JDK_FOUND=no
25384          else
25385            # We're done! :-)
25386            BOOT_JDK_FOUND=yes
25387
25388  # Only process if variable expands to non-empty
25389
25390  if test "x$BOOT_JDK" != x; then
25391    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25392
25393  # Input might be given as Windows format, start by converting to
25394  # unix format.
25395  path="$BOOT_JDK"
25396  new_path=`$CYGPATH -u "$path"`
25397
25398  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25399  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25400  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25401  # "foo.exe" is OK but "foo" is an error.
25402  #
25403  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25404  # It is also a way to make sure we got the proper file name for the real test later on.
25405  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25406  if test "x$test_shortpath" = x; then
25407    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25408$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25409    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25410  fi
25411
25412  # Call helper function which possibly converts this using DOS-style short mode.
25413  # If so, the updated path is stored in $new_path.
25414
25415  input_path="$new_path"
25416  # Check if we need to convert this using DOS-style short mode. If the path
25417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25418  # take no chances and rewrite it.
25419  # Note: m4 eats our [], so we need to use [ and ] instead.
25420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25421  if test "x$has_forbidden_chars" != x; then
25422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25423    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25424    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25425    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25426      # Going to short mode and back again did indeed matter. Since short mode is
25427      # case insensitive, let's make it lowercase to improve readability.
25428      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25429      # Now convert it back to Unix-style (cygpath)
25430      input_path=`$CYGPATH -u "$shortmode_path"`
25431      new_path="$input_path"
25432    fi
25433  fi
25434
25435  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25436  if test "x$test_cygdrive_prefix" = x; then
25437    # As a simple fix, exclude /usr/bin since it's not a real path.
25438    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25439      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25440      # a path prefixed by /cygdrive for fixpath to work.
25441      new_path="$CYGWIN_ROOT_PATH$input_path"
25442    fi
25443  fi
25444
25445
25446  if test "x$path" != "x$new_path"; then
25447    BOOT_JDK="$new_path"
25448    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25449$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25450  fi
25451
25452    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25453
25454  path="$BOOT_JDK"
25455  has_colon=`$ECHO $path | $GREP ^.:`
25456  new_path="$path"
25457  if test "x$has_colon" = x; then
25458    # Not in mixed or Windows style, start by that.
25459    new_path=`cmd //c echo $path`
25460  fi
25461
25462
25463  input_path="$new_path"
25464  # Check if we need to convert this using DOS-style short mode. If the path
25465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25466  # take no chances and rewrite it.
25467  # Note: m4 eats our [], so we need to use [ and ] instead.
25468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25469  if test "x$has_forbidden_chars" != x; then
25470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25471    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25472  fi
25473
25474
25475  windows_path="$new_path"
25476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25477    unix_path=`$CYGPATH -u "$windows_path"`
25478    new_path="$unix_path"
25479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25481    new_path="$unix_path"
25482  fi
25483
25484  if test "x$path" != "x$new_path"; then
25485    BOOT_JDK="$new_path"
25486    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25487$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25488  fi
25489
25490  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25491  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25492
25493    else
25494      # We're on a unix platform. Hooray! :)
25495      path="$BOOT_JDK"
25496      has_space=`$ECHO "$path" | $GREP " "`
25497      if test "x$has_space" != x; then
25498        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25499$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25500        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25501      fi
25502
25503      # Use eval to expand a potential ~
25504      eval path="$path"
25505      if test ! -f "$path" && test ! -d "$path"; then
25506        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25507      fi
25508
25509      if test -d "$path"; then
25510        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25511      else
25512        dir="`$DIRNAME "$path"`"
25513        base="`$BASENAME "$path"`"
25514        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25515      fi
25516    fi
25517  fi
25518
25519            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25520$as_echo_n "checking for Boot JDK... " >&6; }
25521            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25522$as_echo "$BOOT_JDK" >&6; }
25523            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25524$as_echo_n "checking Boot JDK version... " >&6; }
25525            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25526            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25527$as_echo "$BOOT_JDK_VERSION" >&6; }
25528          fi # end check jdk version
25529        fi # end check javac
25530      fi # end check java
25531    fi # end check boot jdk found
25532  fi
25533
25534
25535  if test "x$BOOT_JDK_FOUND" = xno; then
25536    # Now execute the test
25537
25538  if test -x /usr/libexec/java_home; then
25539    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25540    BOOT_JDK_FOUND=maybe
25541    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25542$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25543  fi
25544
25545
25546    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25547    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25548      # Do we have a bin/java?
25549      if test ! -x "$BOOT_JDK/bin/java"; then
25550        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25551$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25552        BOOT_JDK_FOUND=no
25553      else
25554        # Do we have a bin/javac?
25555        if test ! -x "$BOOT_JDK/bin/javac"; then
25556          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25557$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25558          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25559$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25560          BOOT_JDK_FOUND=no
25561        else
25562          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25563          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25564
25565          # Extra M4 quote needed to protect [] in grep expression.
25566          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25567          if test "x$FOUND_CORRECT_VERSION" = x; then
25568            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25569$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25570            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25571$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25572            BOOT_JDK_FOUND=no
25573          else
25574            # We're done! :-)
25575            BOOT_JDK_FOUND=yes
25576
25577  # Only process if variable expands to non-empty
25578
25579  if test "x$BOOT_JDK" != x; then
25580    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25581
25582  # Input might be given as Windows format, start by converting to
25583  # unix format.
25584  path="$BOOT_JDK"
25585  new_path=`$CYGPATH -u "$path"`
25586
25587  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25588  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25589  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25590  # "foo.exe" is OK but "foo" is an error.
25591  #
25592  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25593  # It is also a way to make sure we got the proper file name for the real test later on.
25594  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25595  if test "x$test_shortpath" = x; then
25596    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25597$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25598    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25599  fi
25600
25601  # Call helper function which possibly converts this using DOS-style short mode.
25602  # If so, the updated path is stored in $new_path.
25603
25604  input_path="$new_path"
25605  # Check if we need to convert this using DOS-style short mode. If the path
25606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25607  # take no chances and rewrite it.
25608  # Note: m4 eats our [], so we need to use [ and ] instead.
25609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25610  if test "x$has_forbidden_chars" != x; then
25611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25612    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25613    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25614    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25615      # Going to short mode and back again did indeed matter. Since short mode is
25616      # case insensitive, let's make it lowercase to improve readability.
25617      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25618      # Now convert it back to Unix-style (cygpath)
25619      input_path=`$CYGPATH -u "$shortmode_path"`
25620      new_path="$input_path"
25621    fi
25622  fi
25623
25624  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25625  if test "x$test_cygdrive_prefix" = x; then
25626    # As a simple fix, exclude /usr/bin since it's not a real path.
25627    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25628      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25629      # a path prefixed by /cygdrive for fixpath to work.
25630      new_path="$CYGWIN_ROOT_PATH$input_path"
25631    fi
25632  fi
25633
25634
25635  if test "x$path" != "x$new_path"; then
25636    BOOT_JDK="$new_path"
25637    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25638$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25639  fi
25640
25641    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25642
25643  path="$BOOT_JDK"
25644  has_colon=`$ECHO $path | $GREP ^.:`
25645  new_path="$path"
25646  if test "x$has_colon" = x; then
25647    # Not in mixed or Windows style, start by that.
25648    new_path=`cmd //c echo $path`
25649  fi
25650
25651
25652  input_path="$new_path"
25653  # Check if we need to convert this using DOS-style short mode. If the path
25654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25655  # take no chances and rewrite it.
25656  # Note: m4 eats our [], so we need to use [ and ] instead.
25657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25658  if test "x$has_forbidden_chars" != x; then
25659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25660    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25661  fi
25662
25663
25664  windows_path="$new_path"
25665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25666    unix_path=`$CYGPATH -u "$windows_path"`
25667    new_path="$unix_path"
25668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25670    new_path="$unix_path"
25671  fi
25672
25673  if test "x$path" != "x$new_path"; then
25674    BOOT_JDK="$new_path"
25675    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25676$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25677  fi
25678
25679  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25680  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25681
25682    else
25683      # We're on a unix platform. Hooray! :)
25684      path="$BOOT_JDK"
25685      has_space=`$ECHO "$path" | $GREP " "`
25686      if test "x$has_space" != x; then
25687        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25688$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25689        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25690      fi
25691
25692      # Use eval to expand a potential ~
25693      eval path="$path"
25694      if test ! -f "$path" && test ! -d "$path"; then
25695        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25696      fi
25697
25698      if test -d "$path"; then
25699        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25700      else
25701        dir="`$DIRNAME "$path"`"
25702        base="`$BASENAME "$path"`"
25703        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25704      fi
25705    fi
25706  fi
25707
25708            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25709$as_echo_n "checking for Boot JDK... " >&6; }
25710            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25711$as_echo "$BOOT_JDK" >&6; }
25712            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25713$as_echo_n "checking Boot JDK version... " >&6; }
25714            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25715            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25716$as_echo "$BOOT_JDK_VERSION" >&6; }
25717          fi # end check jdk version
25718        fi # end check javac
25719      fi # end check java
25720    fi # end check boot jdk found
25721  fi
25722
25723  fi
25724
25725
25726    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25727    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25728      # Do we have a bin/java?
25729      if test ! -x "$BOOT_JDK/bin/java"; then
25730        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25731$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25732        BOOT_JDK_FOUND=no
25733      else
25734        # Do we have a bin/javac?
25735        if test ! -x "$BOOT_JDK/bin/javac"; then
25736          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25737$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25738          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25739$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25740          BOOT_JDK_FOUND=no
25741        else
25742          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25743          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25744
25745          # Extra M4 quote needed to protect [] in grep expression.
25746          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25747          if test "x$FOUND_CORRECT_VERSION" = x; then
25748            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25749$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25750            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25751$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25752            BOOT_JDK_FOUND=no
25753          else
25754            # We're done! :-)
25755            BOOT_JDK_FOUND=yes
25756
25757  # Only process if variable expands to non-empty
25758
25759  if test "x$BOOT_JDK" != x; then
25760    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25761
25762  # Input might be given as Windows format, start by converting to
25763  # unix format.
25764  path="$BOOT_JDK"
25765  new_path=`$CYGPATH -u "$path"`
25766
25767  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25768  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25769  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25770  # "foo.exe" is OK but "foo" is an error.
25771  #
25772  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25773  # It is also a way to make sure we got the proper file name for the real test later on.
25774  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25775  if test "x$test_shortpath" = x; then
25776    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25777$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25778    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25779  fi
25780
25781  # Call helper function which possibly converts this using DOS-style short mode.
25782  # If so, the updated path is stored in $new_path.
25783
25784  input_path="$new_path"
25785  # Check if we need to convert this using DOS-style short mode. If the path
25786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25787  # take no chances and rewrite it.
25788  # Note: m4 eats our [], so we need to use [ and ] instead.
25789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25790  if test "x$has_forbidden_chars" != x; then
25791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25792    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25793    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25794    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25795      # Going to short mode and back again did indeed matter. Since short mode is
25796      # case insensitive, let's make it lowercase to improve readability.
25797      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25798      # Now convert it back to Unix-style (cygpath)
25799      input_path=`$CYGPATH -u "$shortmode_path"`
25800      new_path="$input_path"
25801    fi
25802  fi
25803
25804  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25805  if test "x$test_cygdrive_prefix" = x; then
25806    # As a simple fix, exclude /usr/bin since it's not a real path.
25807    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25808      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25809      # a path prefixed by /cygdrive for fixpath to work.
25810      new_path="$CYGWIN_ROOT_PATH$input_path"
25811    fi
25812  fi
25813
25814
25815  if test "x$path" != "x$new_path"; then
25816    BOOT_JDK="$new_path"
25817    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25818$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25819  fi
25820
25821    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25822
25823  path="$BOOT_JDK"
25824  has_colon=`$ECHO $path | $GREP ^.:`
25825  new_path="$path"
25826  if test "x$has_colon" = x; then
25827    # Not in mixed or Windows style, start by that.
25828    new_path=`cmd //c echo $path`
25829  fi
25830
25831
25832  input_path="$new_path"
25833  # Check if we need to convert this using DOS-style short mode. If the path
25834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25835  # take no chances and rewrite it.
25836  # Note: m4 eats our [], so we need to use [ and ] instead.
25837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25838  if test "x$has_forbidden_chars" != x; then
25839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25840    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25841  fi
25842
25843
25844  windows_path="$new_path"
25845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25846    unix_path=`$CYGPATH -u "$windows_path"`
25847    new_path="$unix_path"
25848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25849    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25850    new_path="$unix_path"
25851  fi
25852
25853  if test "x$path" != "x$new_path"; then
25854    BOOT_JDK="$new_path"
25855    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25856$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25857  fi
25858
25859  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25860  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25861
25862    else
25863      # We're on a unix platform. Hooray! :)
25864      path="$BOOT_JDK"
25865      has_space=`$ECHO "$path" | $GREP " "`
25866      if test "x$has_space" != x; then
25867        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25868$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25869        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25870      fi
25871
25872      # Use eval to expand a potential ~
25873      eval path="$path"
25874      if test ! -f "$path" && test ! -d "$path"; then
25875        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25876      fi
25877
25878      if test -d "$path"; then
25879        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25880      else
25881        dir="`$DIRNAME "$path"`"
25882        base="`$BASENAME "$path"`"
25883        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25884      fi
25885    fi
25886  fi
25887
25888            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25889$as_echo_n "checking for Boot JDK... " >&6; }
25890            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25891$as_echo "$BOOT_JDK" >&6; }
25892            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25893$as_echo_n "checking Boot JDK version... " >&6; }
25894            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25895            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25896$as_echo "$BOOT_JDK_VERSION" >&6; }
25897          fi # end check jdk version
25898        fi # end check javac
25899      fi # end check java
25900    fi # end check boot jdk found
25901  fi
25902
25903
25904  # Test: Is $JAVA_HOME set?
25905
25906  if test "x$BOOT_JDK_FOUND" = xno; then
25907    # Now execute the test
25908
25909  if test "x$JAVA_HOME" != x; then
25910    JAVA_HOME_PROCESSED="$JAVA_HOME"
25911
25912  # Only process if variable expands to non-empty
25913
25914  if test "x$JAVA_HOME_PROCESSED" != x; then
25915    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25916
25917  # Input might be given as Windows format, start by converting to
25918  # unix format.
25919  path="$JAVA_HOME_PROCESSED"
25920  new_path=`$CYGPATH -u "$path"`
25921
25922  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25923  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25924  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25925  # "foo.exe" is OK but "foo" is an error.
25926  #
25927  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25928  # It is also a way to make sure we got the proper file name for the real test later on.
25929  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25930  if test "x$test_shortpath" = x; then
25931    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25932$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25933    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
25934  fi
25935
25936  # Call helper function which possibly converts this using DOS-style short mode.
25937  # If so, the updated path is stored in $new_path.
25938
25939  input_path="$new_path"
25940  # Check if we need to convert this using DOS-style short mode. If the path
25941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25942  # take no chances and rewrite it.
25943  # Note: m4 eats our [], so we need to use [ and ] instead.
25944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25945  if test "x$has_forbidden_chars" != x; then
25946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25947    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25948    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25949    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25950      # Going to short mode and back again did indeed matter. Since short mode is
25951      # case insensitive, let's make it lowercase to improve readability.
25952      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25953      # Now convert it back to Unix-style (cygpath)
25954      input_path=`$CYGPATH -u "$shortmode_path"`
25955      new_path="$input_path"
25956    fi
25957  fi
25958
25959  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25960  if test "x$test_cygdrive_prefix" = x; then
25961    # As a simple fix, exclude /usr/bin since it's not a real path.
25962    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25963      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25964      # a path prefixed by /cygdrive for fixpath to work.
25965      new_path="$CYGWIN_ROOT_PATH$input_path"
25966    fi
25967  fi
25968
25969
25970  if test "x$path" != "x$new_path"; then
25971    JAVA_HOME_PROCESSED="$new_path"
25972    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25973$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25974  fi
25975
25976    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25977
25978  path="$JAVA_HOME_PROCESSED"
25979  has_colon=`$ECHO $path | $GREP ^.:`
25980  new_path="$path"
25981  if test "x$has_colon" = x; then
25982    # Not in mixed or Windows style, start by that.
25983    new_path=`cmd //c echo $path`
25984  fi
25985
25986
25987  input_path="$new_path"
25988  # Check if we need to convert this using DOS-style short mode. If the path
25989  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25990  # take no chances and rewrite it.
25991  # Note: m4 eats our [], so we need to use [ and ] instead.
25992  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25993  if test "x$has_forbidden_chars" != x; then
25994    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25995    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25996  fi
25997
25998
25999  windows_path="$new_path"
26000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26001    unix_path=`$CYGPATH -u "$windows_path"`
26002    new_path="$unix_path"
26003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26005    new_path="$unix_path"
26006  fi
26007
26008  if test "x$path" != "x$new_path"; then
26009    JAVA_HOME_PROCESSED="$new_path"
26010    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26011$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26012  fi
26013
26014  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26015  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26016
26017    else
26018      # We're on a unix platform. Hooray! :)
26019      path="$JAVA_HOME_PROCESSED"
26020      has_space=`$ECHO "$path" | $GREP " "`
26021      if test "x$has_space" != x; then
26022        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26023$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26024        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26025      fi
26026
26027      # Use eval to expand a potential ~
26028      eval path="$path"
26029      if test ! -f "$path" && test ! -d "$path"; then
26030        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26031      fi
26032
26033      if test -d "$path"; then
26034        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26035      else
26036        dir="`$DIRNAME "$path"`"
26037        base="`$BASENAME "$path"`"
26038        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26039      fi
26040    fi
26041  fi
26042
26043    if test ! -d "$JAVA_HOME_PROCESSED"; then
26044      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26045$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26046    else
26047      # Aha, the user has set a JAVA_HOME
26048      # let us use that as the Boot JDK.
26049      BOOT_JDK="$JAVA_HOME_PROCESSED"
26050      BOOT_JDK_FOUND=maybe
26051      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26052$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26053    fi
26054  fi
26055
26056
26057    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26058    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26059      # Do we have a bin/java?
26060      if test ! -x "$BOOT_JDK/bin/java"; then
26061        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26062$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26063        BOOT_JDK_FOUND=no
26064      else
26065        # Do we have a bin/javac?
26066        if test ! -x "$BOOT_JDK/bin/javac"; then
26067          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26068$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26069          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26070$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26071          BOOT_JDK_FOUND=no
26072        else
26073          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26074          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26075
26076          # Extra M4 quote needed to protect [] in grep expression.
26077          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26078          if test "x$FOUND_CORRECT_VERSION" = x; then
26079            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26080$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26081            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26082$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26083            BOOT_JDK_FOUND=no
26084          else
26085            # We're done! :-)
26086            BOOT_JDK_FOUND=yes
26087
26088  # Only process if variable expands to non-empty
26089
26090  if test "x$BOOT_JDK" != x; then
26091    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26092
26093  # Input might be given as Windows format, start by converting to
26094  # unix format.
26095  path="$BOOT_JDK"
26096  new_path=`$CYGPATH -u "$path"`
26097
26098  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26099  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26100  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26101  # "foo.exe" is OK but "foo" is an error.
26102  #
26103  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26104  # It is also a way to make sure we got the proper file name for the real test later on.
26105  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26106  if test "x$test_shortpath" = x; then
26107    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26108$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26109    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26110  fi
26111
26112  # Call helper function which possibly converts this using DOS-style short mode.
26113  # If so, the updated path is stored in $new_path.
26114
26115  input_path="$new_path"
26116  # Check if we need to convert this using DOS-style short mode. If the path
26117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26118  # take no chances and rewrite it.
26119  # Note: m4 eats our [], so we need to use [ and ] instead.
26120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26121  if test "x$has_forbidden_chars" != x; then
26122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26123    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26124    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26125    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26126      # Going to short mode and back again did indeed matter. Since short mode is
26127      # case insensitive, let's make it lowercase to improve readability.
26128      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26129      # Now convert it back to Unix-style (cygpath)
26130      input_path=`$CYGPATH -u "$shortmode_path"`
26131      new_path="$input_path"
26132    fi
26133  fi
26134
26135  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26136  if test "x$test_cygdrive_prefix" = x; then
26137    # As a simple fix, exclude /usr/bin since it's not a real path.
26138    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26139      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26140      # a path prefixed by /cygdrive for fixpath to work.
26141      new_path="$CYGWIN_ROOT_PATH$input_path"
26142    fi
26143  fi
26144
26145
26146  if test "x$path" != "x$new_path"; then
26147    BOOT_JDK="$new_path"
26148    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26149$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26150  fi
26151
26152    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26153
26154  path="$BOOT_JDK"
26155  has_colon=`$ECHO $path | $GREP ^.:`
26156  new_path="$path"
26157  if test "x$has_colon" = x; then
26158    # Not in mixed or Windows style, start by that.
26159    new_path=`cmd //c echo $path`
26160  fi
26161
26162
26163  input_path="$new_path"
26164  # Check if we need to convert this using DOS-style short mode. If the path
26165  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26166  # take no chances and rewrite it.
26167  # Note: m4 eats our [], so we need to use [ and ] instead.
26168  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26169  if test "x$has_forbidden_chars" != x; then
26170    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26171    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26172  fi
26173
26174
26175  windows_path="$new_path"
26176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26177    unix_path=`$CYGPATH -u "$windows_path"`
26178    new_path="$unix_path"
26179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26180    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26181    new_path="$unix_path"
26182  fi
26183
26184  if test "x$path" != "x$new_path"; then
26185    BOOT_JDK="$new_path"
26186    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26187$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26188  fi
26189
26190  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26191  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26192
26193    else
26194      # We're on a unix platform. Hooray! :)
26195      path="$BOOT_JDK"
26196      has_space=`$ECHO "$path" | $GREP " "`
26197      if test "x$has_space" != x; then
26198        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26199$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26200        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26201      fi
26202
26203      # Use eval to expand a potential ~
26204      eval path="$path"
26205      if test ! -f "$path" && test ! -d "$path"; then
26206        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26207      fi
26208
26209      if test -d "$path"; then
26210        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26211      else
26212        dir="`$DIRNAME "$path"`"
26213        base="`$BASENAME "$path"`"
26214        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26215      fi
26216    fi
26217  fi
26218
26219            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26220$as_echo_n "checking for Boot JDK... " >&6; }
26221            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26222$as_echo "$BOOT_JDK" >&6; }
26223            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26224$as_echo_n "checking Boot JDK version... " >&6; }
26225            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26226            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26227$as_echo "$BOOT_JDK_VERSION" >&6; }
26228          fi # end check jdk version
26229        fi # end check javac
26230      fi # end check java
26231    fi # end check boot jdk found
26232  fi
26233
26234
26235  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26236
26237  if test "x$BOOT_JDK_FOUND" = xno; then
26238    # Now execute the test
26239
26240  # Extract the first word of "javac", so it can be a program name with args.
26241set dummy javac; ac_word=$2
26242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26243$as_echo_n "checking for $ac_word... " >&6; }
26244if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26245  $as_echo_n "(cached) " >&6
26246else
26247  case $JAVAC_CHECK in
26248  [\\/]* | ?:[\\/]*)
26249  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26250  ;;
26251  *)
26252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26253for as_dir in $PATH
26254do
26255  IFS=$as_save_IFS
26256  test -z "$as_dir" && as_dir=.
26257    for ac_exec_ext in '' $ac_executable_extensions; do
26258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26259    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26261    break 2
26262  fi
26263done
26264  done
26265IFS=$as_save_IFS
26266
26267  ;;
26268esac
26269fi
26270JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26271if test -n "$JAVAC_CHECK"; then
26272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26273$as_echo "$JAVAC_CHECK" >&6; }
26274else
26275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26276$as_echo "no" >&6; }
26277fi
26278
26279
26280  # Extract the first word of "java", so it can be a program name with args.
26281set dummy java; ac_word=$2
26282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26283$as_echo_n "checking for $ac_word... " >&6; }
26284if ${ac_cv_path_JAVA_CHECK+:} false; then :
26285  $as_echo_n "(cached) " >&6
26286else
26287  case $JAVA_CHECK in
26288  [\\/]* | ?:[\\/]*)
26289  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26290  ;;
26291  *)
26292  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26293for as_dir in $PATH
26294do
26295  IFS=$as_save_IFS
26296  test -z "$as_dir" && as_dir=.
26297    for ac_exec_ext in '' $ac_executable_extensions; do
26298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26299    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26301    break 2
26302  fi
26303done
26304  done
26305IFS=$as_save_IFS
26306
26307  ;;
26308esac
26309fi
26310JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26311if test -n "$JAVA_CHECK"; then
26312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26313$as_echo "$JAVA_CHECK" >&6; }
26314else
26315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26316$as_echo "no" >&6; }
26317fi
26318
26319
26320  BINARY="$JAVAC_CHECK"
26321  if test "x$JAVAC_CHECK" = x; then
26322    BINARY="$JAVA_CHECK"
26323  fi
26324  if test "x$BINARY" != x; then
26325    # So there is a java(c) binary, it might be part of a JDK.
26326    # Lets find the JDK/JRE directory by following symbolic links.
26327    # Linux/GNU systems often have links from /usr/bin/java to
26328    # /etc/alternatives/java to the real JDK binary.
26329
26330  if test "x$OPENJDK_BUILD_OS" != xwindows; then
26331    # Follow a chain of symbolic links. Use readlink
26332    # where it exists, else fall back to horribly
26333    # complicated shell code.
26334    if test "x$READLINK_TESTED" != yes; then
26335      # On MacOSX there is a readlink tool with a different
26336      # purpose than the GNU readlink tool. Check the found readlink.
26337      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26338      if test "x$ISGNU" = x; then
26339        # A readlink that we do not know how to use.
26340        # Are there other non-GNU readlinks out there?
26341        READLINK_TESTED=yes
26342        READLINK=
26343      fi
26344    fi
26345
26346    if test "x$READLINK" != x; then
26347      BINARY=`$READLINK -f $BINARY`
26348    else
26349      # Save the current directory for restoring afterwards
26350      STARTDIR=$PWD
26351      COUNTER=0
26352      sym_link_dir=`$DIRNAME $BINARY`
26353      sym_link_file=`$BASENAME $BINARY`
26354      cd $sym_link_dir
26355      # Use -P flag to resolve symlinks in directories.
26356      cd `$THEPWDCMD -P`
26357      sym_link_dir=`$THEPWDCMD -P`
26358      # Resolve file symlinks
26359      while test $COUNTER -lt 20; do
26360        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26361        if test "x$ISLINK" == x; then
26362          # This is not a symbolic link! We are done!
26363          break
26364        fi
26365        # Again resolve directory symlinks since the target of the just found
26366        # link could be in a different directory
26367        cd `$DIRNAME $ISLINK`
26368        sym_link_dir=`$THEPWDCMD -P`
26369        sym_link_file=`$BASENAME $ISLINK`
26370        let COUNTER=COUNTER+1
26371      done
26372      cd $STARTDIR
26373      BINARY=$sym_link_dir/$sym_link_file
26374    fi
26375  fi
26376
26377    BOOT_JDK=`dirname "$BINARY"`
26378    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26379    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26380      # Looks like we found ourselves an JDK
26381      BOOT_JDK_FOUND=maybe
26382      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26383$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26384    fi
26385  fi
26386
26387
26388    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26389    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26390      # Do we have a bin/java?
26391      if test ! -x "$BOOT_JDK/bin/java"; then
26392        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26393$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26394        BOOT_JDK_FOUND=no
26395      else
26396        # Do we have a bin/javac?
26397        if test ! -x "$BOOT_JDK/bin/javac"; then
26398          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26399$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26400          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26401$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26402          BOOT_JDK_FOUND=no
26403        else
26404          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26405          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26406
26407          # Extra M4 quote needed to protect [] in grep expression.
26408          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26409          if test "x$FOUND_CORRECT_VERSION" = x; then
26410            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26411$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26412            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26413$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26414            BOOT_JDK_FOUND=no
26415          else
26416            # We're done! :-)
26417            BOOT_JDK_FOUND=yes
26418
26419  # Only process if variable expands to non-empty
26420
26421  if test "x$BOOT_JDK" != x; then
26422    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26423
26424  # Input might be given as Windows format, start by converting to
26425  # unix format.
26426  path="$BOOT_JDK"
26427  new_path=`$CYGPATH -u "$path"`
26428
26429  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26430  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26431  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26432  # "foo.exe" is OK but "foo" is an error.
26433  #
26434  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26435  # It is also a way to make sure we got the proper file name for the real test later on.
26436  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26437  if test "x$test_shortpath" = x; then
26438    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26439$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26440    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26441  fi
26442
26443  # Call helper function which possibly converts this using DOS-style short mode.
26444  # If so, the updated path is stored in $new_path.
26445
26446  input_path="$new_path"
26447  # Check if we need to convert this using DOS-style short mode. If the path
26448  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26449  # take no chances and rewrite it.
26450  # Note: m4 eats our [], so we need to use [ and ] instead.
26451  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26452  if test "x$has_forbidden_chars" != x; then
26453    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26454    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26455    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26456    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26457      # Going to short mode and back again did indeed matter. Since short mode is
26458      # case insensitive, let's make it lowercase to improve readability.
26459      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26460      # Now convert it back to Unix-style (cygpath)
26461      input_path=`$CYGPATH -u "$shortmode_path"`
26462      new_path="$input_path"
26463    fi
26464  fi
26465
26466  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26467  if test "x$test_cygdrive_prefix" = x; then
26468    # As a simple fix, exclude /usr/bin since it's not a real path.
26469    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26470      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26471      # a path prefixed by /cygdrive for fixpath to work.
26472      new_path="$CYGWIN_ROOT_PATH$input_path"
26473    fi
26474  fi
26475
26476
26477  if test "x$path" != "x$new_path"; then
26478    BOOT_JDK="$new_path"
26479    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26480$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26481  fi
26482
26483    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26484
26485  path="$BOOT_JDK"
26486  has_colon=`$ECHO $path | $GREP ^.:`
26487  new_path="$path"
26488  if test "x$has_colon" = x; then
26489    # Not in mixed or Windows style, start by that.
26490    new_path=`cmd //c echo $path`
26491  fi
26492
26493
26494  input_path="$new_path"
26495  # Check if we need to convert this using DOS-style short mode. If the path
26496  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26497  # take no chances and rewrite it.
26498  # Note: m4 eats our [], so we need to use [ and ] instead.
26499  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26500  if test "x$has_forbidden_chars" != x; then
26501    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26502    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26503  fi
26504
26505
26506  windows_path="$new_path"
26507  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26508    unix_path=`$CYGPATH -u "$windows_path"`
26509    new_path="$unix_path"
26510  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26511    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26512    new_path="$unix_path"
26513  fi
26514
26515  if test "x$path" != "x$new_path"; then
26516    BOOT_JDK="$new_path"
26517    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26518$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26519  fi
26520
26521  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26522  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26523
26524    else
26525      # We're on a unix platform. Hooray! :)
26526      path="$BOOT_JDK"
26527      has_space=`$ECHO "$path" | $GREP " "`
26528      if test "x$has_space" != x; then
26529        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26530$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26531        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26532      fi
26533
26534      # Use eval to expand a potential ~
26535      eval path="$path"
26536      if test ! -f "$path" && test ! -d "$path"; then
26537        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26538      fi
26539
26540      if test -d "$path"; then
26541        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26542      else
26543        dir="`$DIRNAME "$path"`"
26544        base="`$BASENAME "$path"`"
26545        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26546      fi
26547    fi
26548  fi
26549
26550            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26551$as_echo_n "checking for Boot JDK... " >&6; }
26552            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26553$as_echo "$BOOT_JDK" >&6; }
26554            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26555$as_echo_n "checking Boot JDK version... " >&6; }
26556            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26557            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26558$as_echo "$BOOT_JDK_VERSION" >&6; }
26559          fi # end check jdk version
26560        fi # end check javac
26561      fi # end check java
26562    fi # end check boot jdk found
26563  fi
26564
26565
26566  # Test: Is there a JDK installed in default, well-known locations?
26567
26568  if test "x$BOOT_JDK_FOUND" = xno; then
26569    # Now execute the test
26570
26571  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26572
26573  if test "x$BOOT_JDK_FOUND" = xno; then
26574    # Now execute the test
26575
26576  if test "x$ProgramW6432" != x; then
26577    VIRTUAL_DIR="$ProgramW6432/Java"
26578
26579  windows_path="$VIRTUAL_DIR"
26580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26581    unix_path=`$CYGPATH -u "$windows_path"`
26582    VIRTUAL_DIR="$unix_path"
26583  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26584    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26585    VIRTUAL_DIR="$unix_path"
26586  fi
26587
26588
26589  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26590  BOOT_JDK_SUFFIX=""
26591  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26592  if test "x$ALL_JDKS_FOUND" != x; then
26593    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26594
26595  if test "x$BOOT_JDK_FOUND" = xno; then
26596    # Now execute the test
26597
26598        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26599        if test -d "$BOOT_JDK"; then
26600          BOOT_JDK_FOUND=maybe
26601          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26602$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26603        fi
26604
26605
26606    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26607    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26608      # Do we have a bin/java?
26609      if test ! -x "$BOOT_JDK/bin/java"; then
26610        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26611$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26612        BOOT_JDK_FOUND=no
26613      else
26614        # Do we have a bin/javac?
26615        if test ! -x "$BOOT_JDK/bin/javac"; then
26616          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26617$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26618          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26619$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26620          BOOT_JDK_FOUND=no
26621        else
26622          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26623          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26624
26625          # Extra M4 quote needed to protect [] in grep expression.
26626          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26627          if test "x$FOUND_CORRECT_VERSION" = x; then
26628            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26629$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26630            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26631$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26632            BOOT_JDK_FOUND=no
26633          else
26634            # We're done! :-)
26635            BOOT_JDK_FOUND=yes
26636
26637  # Only process if variable expands to non-empty
26638
26639  if test "x$BOOT_JDK" != x; then
26640    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26641
26642  # Input might be given as Windows format, start by converting to
26643  # unix format.
26644  path="$BOOT_JDK"
26645  new_path=`$CYGPATH -u "$path"`
26646
26647  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26648  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26649  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26650  # "foo.exe" is OK but "foo" is an error.
26651  #
26652  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26653  # It is also a way to make sure we got the proper file name for the real test later on.
26654  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26655  if test "x$test_shortpath" = x; then
26656    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26657$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26658    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26659  fi
26660
26661  # Call helper function which possibly converts this using DOS-style short mode.
26662  # If so, the updated path is stored in $new_path.
26663
26664  input_path="$new_path"
26665  # Check if we need to convert this using DOS-style short mode. If the path
26666  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26667  # take no chances and rewrite it.
26668  # Note: m4 eats our [], so we need to use [ and ] instead.
26669  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26670  if test "x$has_forbidden_chars" != x; then
26671    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26672    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26673    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26674    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26675      # Going to short mode and back again did indeed matter. Since short mode is
26676      # case insensitive, let's make it lowercase to improve readability.
26677      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26678      # Now convert it back to Unix-style (cygpath)
26679      input_path=`$CYGPATH -u "$shortmode_path"`
26680      new_path="$input_path"
26681    fi
26682  fi
26683
26684  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26685  if test "x$test_cygdrive_prefix" = x; then
26686    # As a simple fix, exclude /usr/bin since it's not a real path.
26687    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26688      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26689      # a path prefixed by /cygdrive for fixpath to work.
26690      new_path="$CYGWIN_ROOT_PATH$input_path"
26691    fi
26692  fi
26693
26694
26695  if test "x$path" != "x$new_path"; then
26696    BOOT_JDK="$new_path"
26697    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26698$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26699  fi
26700
26701    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26702
26703  path="$BOOT_JDK"
26704  has_colon=`$ECHO $path | $GREP ^.:`
26705  new_path="$path"
26706  if test "x$has_colon" = x; then
26707    # Not in mixed or Windows style, start by that.
26708    new_path=`cmd //c echo $path`
26709  fi
26710
26711
26712  input_path="$new_path"
26713  # Check if we need to convert this using DOS-style short mode. If the path
26714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26715  # take no chances and rewrite it.
26716  # Note: m4 eats our [], so we need to use [ and ] instead.
26717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26718  if test "x$has_forbidden_chars" != x; then
26719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26720    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26721  fi
26722
26723
26724  windows_path="$new_path"
26725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26726    unix_path=`$CYGPATH -u "$windows_path"`
26727    new_path="$unix_path"
26728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26730    new_path="$unix_path"
26731  fi
26732
26733  if test "x$path" != "x$new_path"; then
26734    BOOT_JDK="$new_path"
26735    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26736$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26737  fi
26738
26739  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26740  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26741
26742    else
26743      # We're on a unix platform. Hooray! :)
26744      path="$BOOT_JDK"
26745      has_space=`$ECHO "$path" | $GREP " "`
26746      if test "x$has_space" != x; then
26747        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26748$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26749        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26750      fi
26751
26752      # Use eval to expand a potential ~
26753      eval path="$path"
26754      if test ! -f "$path" && test ! -d "$path"; then
26755        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26756      fi
26757
26758      if test -d "$path"; then
26759        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26760      else
26761        dir="`$DIRNAME "$path"`"
26762        base="`$BASENAME "$path"`"
26763        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26764      fi
26765    fi
26766  fi
26767
26768            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26769$as_echo_n "checking for Boot JDK... " >&6; }
26770            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26771$as_echo "$BOOT_JDK" >&6; }
26772            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26773$as_echo_n "checking Boot JDK version... " >&6; }
26774            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26775            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26776$as_echo "$BOOT_JDK_VERSION" >&6; }
26777          fi # end check jdk version
26778        fi # end check javac
26779      fi # end check java
26780    fi # end check boot jdk found
26781  fi
26782
26783    done
26784  fi
26785
26786  fi
26787
26788
26789    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26790    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26791      # Do we have a bin/java?
26792      if test ! -x "$BOOT_JDK/bin/java"; then
26793        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26794$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26795        BOOT_JDK_FOUND=no
26796      else
26797        # Do we have a bin/javac?
26798        if test ! -x "$BOOT_JDK/bin/javac"; then
26799          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26800$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26801          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26802$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26803          BOOT_JDK_FOUND=no
26804        else
26805          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26806          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26807
26808          # Extra M4 quote needed to protect [] in grep expression.
26809          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26810          if test "x$FOUND_CORRECT_VERSION" = x; then
26811            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26812$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26813            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26814$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26815            BOOT_JDK_FOUND=no
26816          else
26817            # We're done! :-)
26818            BOOT_JDK_FOUND=yes
26819
26820  # Only process if variable expands to non-empty
26821
26822  if test "x$BOOT_JDK" != x; then
26823    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26824
26825  # Input might be given as Windows format, start by converting to
26826  # unix format.
26827  path="$BOOT_JDK"
26828  new_path=`$CYGPATH -u "$path"`
26829
26830  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26831  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26832  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26833  # "foo.exe" is OK but "foo" is an error.
26834  #
26835  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26836  # It is also a way to make sure we got the proper file name for the real test later on.
26837  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26838  if test "x$test_shortpath" = x; then
26839    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26840$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26841    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26842  fi
26843
26844  # Call helper function which possibly converts this using DOS-style short mode.
26845  # If so, the updated path is stored in $new_path.
26846
26847  input_path="$new_path"
26848  # Check if we need to convert this using DOS-style short mode. If the path
26849  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26850  # take no chances and rewrite it.
26851  # Note: m4 eats our [], so we need to use [ and ] instead.
26852  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26853  if test "x$has_forbidden_chars" != x; then
26854    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26855    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26856    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26857    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26858      # Going to short mode and back again did indeed matter. Since short mode is
26859      # case insensitive, let's make it lowercase to improve readability.
26860      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26861      # Now convert it back to Unix-style (cygpath)
26862      input_path=`$CYGPATH -u "$shortmode_path"`
26863      new_path="$input_path"
26864    fi
26865  fi
26866
26867  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26868  if test "x$test_cygdrive_prefix" = x; then
26869    # As a simple fix, exclude /usr/bin since it's not a real path.
26870    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26871      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26872      # a path prefixed by /cygdrive for fixpath to work.
26873      new_path="$CYGWIN_ROOT_PATH$input_path"
26874    fi
26875  fi
26876
26877
26878  if test "x$path" != "x$new_path"; then
26879    BOOT_JDK="$new_path"
26880    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26881$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26882  fi
26883
26884    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26885
26886  path="$BOOT_JDK"
26887  has_colon=`$ECHO $path | $GREP ^.:`
26888  new_path="$path"
26889  if test "x$has_colon" = x; then
26890    # Not in mixed or Windows style, start by that.
26891    new_path=`cmd //c echo $path`
26892  fi
26893
26894
26895  input_path="$new_path"
26896  # Check if we need to convert this using DOS-style short mode. If the path
26897  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26898  # take no chances and rewrite it.
26899  # Note: m4 eats our [], so we need to use [ and ] instead.
26900  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26901  if test "x$has_forbidden_chars" != x; then
26902    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26903    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26904  fi
26905
26906
26907  windows_path="$new_path"
26908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26909    unix_path=`$CYGPATH -u "$windows_path"`
26910    new_path="$unix_path"
26911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26913    new_path="$unix_path"
26914  fi
26915
26916  if test "x$path" != "x$new_path"; then
26917    BOOT_JDK="$new_path"
26918    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26919$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26920  fi
26921
26922  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26923  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26924
26925    else
26926      # We're on a unix platform. Hooray! :)
26927      path="$BOOT_JDK"
26928      has_space=`$ECHO "$path" | $GREP " "`
26929      if test "x$has_space" != x; then
26930        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26931$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26932        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26933      fi
26934
26935      # Use eval to expand a potential ~
26936      eval path="$path"
26937      if test ! -f "$path" && test ! -d "$path"; then
26938        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26939      fi
26940
26941      if test -d "$path"; then
26942        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26943      else
26944        dir="`$DIRNAME "$path"`"
26945        base="`$BASENAME "$path"`"
26946        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26947      fi
26948    fi
26949  fi
26950
26951            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26952$as_echo_n "checking for Boot JDK... " >&6; }
26953            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26954$as_echo "$BOOT_JDK" >&6; }
26955            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26956$as_echo_n "checking Boot JDK version... " >&6; }
26957            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26958            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26959$as_echo "$BOOT_JDK_VERSION" >&6; }
26960          fi # end check jdk version
26961        fi # end check javac
26962      fi # end check java
26963    fi # end check boot jdk found
26964  fi
26965
26966
26967  if test "x$BOOT_JDK_FOUND" = xno; then
26968    # Now execute the test
26969
26970  if test "x$PROGRAMW6432" != x; then
26971    VIRTUAL_DIR="$PROGRAMW6432/Java"
26972
26973  windows_path="$VIRTUAL_DIR"
26974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26975    unix_path=`$CYGPATH -u "$windows_path"`
26976    VIRTUAL_DIR="$unix_path"
26977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26979    VIRTUAL_DIR="$unix_path"
26980  fi
26981
26982
26983  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26984  BOOT_JDK_SUFFIX=""
26985  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26986  if test "x$ALL_JDKS_FOUND" != x; then
26987    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26988
26989  if test "x$BOOT_JDK_FOUND" = xno; then
26990    # Now execute the test
26991
26992        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26993        if test -d "$BOOT_JDK"; then
26994          BOOT_JDK_FOUND=maybe
26995          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26996$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26997        fi
26998
26999
27000    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27001    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27002      # Do we have a bin/java?
27003      if test ! -x "$BOOT_JDK/bin/java"; then
27004        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27005$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27006        BOOT_JDK_FOUND=no
27007      else
27008        # Do we have a bin/javac?
27009        if test ! -x "$BOOT_JDK/bin/javac"; then
27010          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27011$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27012          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27013$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27014          BOOT_JDK_FOUND=no
27015        else
27016          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27017          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27018
27019          # Extra M4 quote needed to protect [] in grep expression.
27020          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27021          if test "x$FOUND_CORRECT_VERSION" = x; then
27022            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27023$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27024            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27025$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27026            BOOT_JDK_FOUND=no
27027          else
27028            # We're done! :-)
27029            BOOT_JDK_FOUND=yes
27030
27031  # Only process if variable expands to non-empty
27032
27033  if test "x$BOOT_JDK" != x; then
27034    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27035
27036  # Input might be given as Windows format, start by converting to
27037  # unix format.
27038  path="$BOOT_JDK"
27039  new_path=`$CYGPATH -u "$path"`
27040
27041  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27042  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27043  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27044  # "foo.exe" is OK but "foo" is an error.
27045  #
27046  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27047  # It is also a way to make sure we got the proper file name for the real test later on.
27048  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27049  if test "x$test_shortpath" = x; then
27050    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27051$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27052    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27053  fi
27054
27055  # Call helper function which possibly converts this using DOS-style short mode.
27056  # If so, the updated path is stored in $new_path.
27057
27058  input_path="$new_path"
27059  # Check if we need to convert this using DOS-style short mode. If the path
27060  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27061  # take no chances and rewrite it.
27062  # Note: m4 eats our [], so we need to use [ and ] instead.
27063  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27064  if test "x$has_forbidden_chars" != x; then
27065    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27066    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27067    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27068    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27069      # Going to short mode and back again did indeed matter. Since short mode is
27070      # case insensitive, let's make it lowercase to improve readability.
27071      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27072      # Now convert it back to Unix-style (cygpath)
27073      input_path=`$CYGPATH -u "$shortmode_path"`
27074      new_path="$input_path"
27075    fi
27076  fi
27077
27078  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27079  if test "x$test_cygdrive_prefix" = x; then
27080    # As a simple fix, exclude /usr/bin since it's not a real path.
27081    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27082      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27083      # a path prefixed by /cygdrive for fixpath to work.
27084      new_path="$CYGWIN_ROOT_PATH$input_path"
27085    fi
27086  fi
27087
27088
27089  if test "x$path" != "x$new_path"; then
27090    BOOT_JDK="$new_path"
27091    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27092$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27093  fi
27094
27095    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27096
27097  path="$BOOT_JDK"
27098  has_colon=`$ECHO $path | $GREP ^.:`
27099  new_path="$path"
27100  if test "x$has_colon" = x; then
27101    # Not in mixed or Windows style, start by that.
27102    new_path=`cmd //c echo $path`
27103  fi
27104
27105
27106  input_path="$new_path"
27107  # Check if we need to convert this using DOS-style short mode. If the path
27108  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27109  # take no chances and rewrite it.
27110  # Note: m4 eats our [], so we need to use [ and ] instead.
27111  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27112  if test "x$has_forbidden_chars" != x; then
27113    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27114    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27115  fi
27116
27117
27118  windows_path="$new_path"
27119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27120    unix_path=`$CYGPATH -u "$windows_path"`
27121    new_path="$unix_path"
27122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27123    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27124    new_path="$unix_path"
27125  fi
27126
27127  if test "x$path" != "x$new_path"; then
27128    BOOT_JDK="$new_path"
27129    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27130$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27131  fi
27132
27133  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27134  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27135
27136    else
27137      # We're on a unix platform. Hooray! :)
27138      path="$BOOT_JDK"
27139      has_space=`$ECHO "$path" | $GREP " "`
27140      if test "x$has_space" != x; then
27141        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27142$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27143        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27144      fi
27145
27146      # Use eval to expand a potential ~
27147      eval path="$path"
27148      if test ! -f "$path" && test ! -d "$path"; then
27149        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27150      fi
27151
27152      if test -d "$path"; then
27153        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27154      else
27155        dir="`$DIRNAME "$path"`"
27156        base="`$BASENAME "$path"`"
27157        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27158      fi
27159    fi
27160  fi
27161
27162            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27163$as_echo_n "checking for Boot JDK... " >&6; }
27164            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27165$as_echo "$BOOT_JDK" >&6; }
27166            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27167$as_echo_n "checking Boot JDK version... " >&6; }
27168            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27169            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27170$as_echo "$BOOT_JDK_VERSION" >&6; }
27171          fi # end check jdk version
27172        fi # end check javac
27173      fi # end check java
27174    fi # end check boot jdk found
27175  fi
27176
27177    done
27178  fi
27179
27180  fi
27181
27182
27183    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27184    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27185      # Do we have a bin/java?
27186      if test ! -x "$BOOT_JDK/bin/java"; then
27187        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27188$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27189        BOOT_JDK_FOUND=no
27190      else
27191        # Do we have a bin/javac?
27192        if test ! -x "$BOOT_JDK/bin/javac"; then
27193          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27194$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27195          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27196$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27197          BOOT_JDK_FOUND=no
27198        else
27199          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27200          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27201
27202          # Extra M4 quote needed to protect [] in grep expression.
27203          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27204          if test "x$FOUND_CORRECT_VERSION" = x; then
27205            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27206$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27207            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27208$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27209            BOOT_JDK_FOUND=no
27210          else
27211            # We're done! :-)
27212            BOOT_JDK_FOUND=yes
27213
27214  # Only process if variable expands to non-empty
27215
27216  if test "x$BOOT_JDK" != x; then
27217    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27218
27219  # Input might be given as Windows format, start by converting to
27220  # unix format.
27221  path="$BOOT_JDK"
27222  new_path=`$CYGPATH -u "$path"`
27223
27224  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27225  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27226  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27227  # "foo.exe" is OK but "foo" is an error.
27228  #
27229  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27230  # It is also a way to make sure we got the proper file name for the real test later on.
27231  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27232  if test "x$test_shortpath" = x; then
27233    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27234$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27235    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27236  fi
27237
27238  # Call helper function which possibly converts this using DOS-style short mode.
27239  # If so, the updated path is stored in $new_path.
27240
27241  input_path="$new_path"
27242  # Check if we need to convert this using DOS-style short mode. If the path
27243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27244  # take no chances and rewrite it.
27245  # Note: m4 eats our [], so we need to use [ and ] instead.
27246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27247  if test "x$has_forbidden_chars" != x; then
27248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27249    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27250    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27251    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27252      # Going to short mode and back again did indeed matter. Since short mode is
27253      # case insensitive, let's make it lowercase to improve readability.
27254      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27255      # Now convert it back to Unix-style (cygpath)
27256      input_path=`$CYGPATH -u "$shortmode_path"`
27257      new_path="$input_path"
27258    fi
27259  fi
27260
27261  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27262  if test "x$test_cygdrive_prefix" = x; then
27263    # As a simple fix, exclude /usr/bin since it's not a real path.
27264    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27265      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27266      # a path prefixed by /cygdrive for fixpath to work.
27267      new_path="$CYGWIN_ROOT_PATH$input_path"
27268    fi
27269  fi
27270
27271
27272  if test "x$path" != "x$new_path"; then
27273    BOOT_JDK="$new_path"
27274    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27275$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27276  fi
27277
27278    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27279
27280  path="$BOOT_JDK"
27281  has_colon=`$ECHO $path | $GREP ^.:`
27282  new_path="$path"
27283  if test "x$has_colon" = x; then
27284    # Not in mixed or Windows style, start by that.
27285    new_path=`cmd //c echo $path`
27286  fi
27287
27288
27289  input_path="$new_path"
27290  # Check if we need to convert this using DOS-style short mode. If the path
27291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27292  # take no chances and rewrite it.
27293  # Note: m4 eats our [], so we need to use [ and ] instead.
27294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27295  if test "x$has_forbidden_chars" != x; then
27296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27297    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27298  fi
27299
27300
27301  windows_path="$new_path"
27302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27303    unix_path=`$CYGPATH -u "$windows_path"`
27304    new_path="$unix_path"
27305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27307    new_path="$unix_path"
27308  fi
27309
27310  if test "x$path" != "x$new_path"; then
27311    BOOT_JDK="$new_path"
27312    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27313$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27314  fi
27315
27316  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27317  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27318
27319    else
27320      # We're on a unix platform. Hooray! :)
27321      path="$BOOT_JDK"
27322      has_space=`$ECHO "$path" | $GREP " "`
27323      if test "x$has_space" != x; then
27324        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27325$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27326        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27327      fi
27328
27329      # Use eval to expand a potential ~
27330      eval path="$path"
27331      if test ! -f "$path" && test ! -d "$path"; then
27332        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27333      fi
27334
27335      if test -d "$path"; then
27336        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27337      else
27338        dir="`$DIRNAME "$path"`"
27339        base="`$BASENAME "$path"`"
27340        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27341      fi
27342    fi
27343  fi
27344
27345            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27346$as_echo_n "checking for Boot JDK... " >&6; }
27347            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27348$as_echo "$BOOT_JDK" >&6; }
27349            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27350$as_echo_n "checking Boot JDK version... " >&6; }
27351            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27352            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27353$as_echo "$BOOT_JDK_VERSION" >&6; }
27354          fi # end check jdk version
27355        fi # end check javac
27356      fi # end check java
27357    fi # end check boot jdk found
27358  fi
27359
27360
27361  if test "x$BOOT_JDK_FOUND" = xno; then
27362    # Now execute the test
27363
27364  if test "x$PROGRAMFILES" != x; then
27365    VIRTUAL_DIR="$PROGRAMFILES/Java"
27366
27367  windows_path="$VIRTUAL_DIR"
27368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27369    unix_path=`$CYGPATH -u "$windows_path"`
27370    VIRTUAL_DIR="$unix_path"
27371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27372    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27373    VIRTUAL_DIR="$unix_path"
27374  fi
27375
27376
27377  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27378  BOOT_JDK_SUFFIX=""
27379  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27380  if test "x$ALL_JDKS_FOUND" != x; then
27381    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27382
27383  if test "x$BOOT_JDK_FOUND" = xno; then
27384    # Now execute the test
27385
27386        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27387        if test -d "$BOOT_JDK"; then
27388          BOOT_JDK_FOUND=maybe
27389          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27390$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27391        fi
27392
27393
27394    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27395    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27396      # Do we have a bin/java?
27397      if test ! -x "$BOOT_JDK/bin/java"; then
27398        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27399$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27400        BOOT_JDK_FOUND=no
27401      else
27402        # Do we have a bin/javac?
27403        if test ! -x "$BOOT_JDK/bin/javac"; then
27404          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27405$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27406          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27407$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27408          BOOT_JDK_FOUND=no
27409        else
27410          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27411          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27412
27413          # Extra M4 quote needed to protect [] in grep expression.
27414          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27415          if test "x$FOUND_CORRECT_VERSION" = x; then
27416            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27417$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27418            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27419$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27420            BOOT_JDK_FOUND=no
27421          else
27422            # We're done! :-)
27423            BOOT_JDK_FOUND=yes
27424
27425  # Only process if variable expands to non-empty
27426
27427  if test "x$BOOT_JDK" != x; then
27428    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27429
27430  # Input might be given as Windows format, start by converting to
27431  # unix format.
27432  path="$BOOT_JDK"
27433  new_path=`$CYGPATH -u "$path"`
27434
27435  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27436  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27437  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27438  # "foo.exe" is OK but "foo" is an error.
27439  #
27440  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27441  # It is also a way to make sure we got the proper file name for the real test later on.
27442  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27443  if test "x$test_shortpath" = x; then
27444    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27445$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27446    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27447  fi
27448
27449  # Call helper function which possibly converts this using DOS-style short mode.
27450  # If so, the updated path is stored in $new_path.
27451
27452  input_path="$new_path"
27453  # Check if we need to convert this using DOS-style short mode. If the path
27454  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27455  # take no chances and rewrite it.
27456  # Note: m4 eats our [], so we need to use [ and ] instead.
27457  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27458  if test "x$has_forbidden_chars" != x; then
27459    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27460    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27461    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27462    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27463      # Going to short mode and back again did indeed matter. Since short mode is
27464      # case insensitive, let's make it lowercase to improve readability.
27465      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27466      # Now convert it back to Unix-style (cygpath)
27467      input_path=`$CYGPATH -u "$shortmode_path"`
27468      new_path="$input_path"
27469    fi
27470  fi
27471
27472  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27473  if test "x$test_cygdrive_prefix" = x; then
27474    # As a simple fix, exclude /usr/bin since it's not a real path.
27475    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27476      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27477      # a path prefixed by /cygdrive for fixpath to work.
27478      new_path="$CYGWIN_ROOT_PATH$input_path"
27479    fi
27480  fi
27481
27482
27483  if test "x$path" != "x$new_path"; then
27484    BOOT_JDK="$new_path"
27485    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27486$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27487  fi
27488
27489    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27490
27491  path="$BOOT_JDK"
27492  has_colon=`$ECHO $path | $GREP ^.:`
27493  new_path="$path"
27494  if test "x$has_colon" = x; then
27495    # Not in mixed or Windows style, start by that.
27496    new_path=`cmd //c echo $path`
27497  fi
27498
27499
27500  input_path="$new_path"
27501  # Check if we need to convert this using DOS-style short mode. If the path
27502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27503  # take no chances and rewrite it.
27504  # Note: m4 eats our [], so we need to use [ and ] instead.
27505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27506  if test "x$has_forbidden_chars" != x; then
27507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27508    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27509  fi
27510
27511
27512  windows_path="$new_path"
27513  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27514    unix_path=`$CYGPATH -u "$windows_path"`
27515    new_path="$unix_path"
27516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27517    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27518    new_path="$unix_path"
27519  fi
27520
27521  if test "x$path" != "x$new_path"; then
27522    BOOT_JDK="$new_path"
27523    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27524$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27525  fi
27526
27527  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27528  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27529
27530    else
27531      # We're on a unix platform. Hooray! :)
27532      path="$BOOT_JDK"
27533      has_space=`$ECHO "$path" | $GREP " "`
27534      if test "x$has_space" != x; then
27535        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27536$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27537        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27538      fi
27539
27540      # Use eval to expand a potential ~
27541      eval path="$path"
27542      if test ! -f "$path" && test ! -d "$path"; then
27543        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27544      fi
27545
27546      if test -d "$path"; then
27547        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27548      else
27549        dir="`$DIRNAME "$path"`"
27550        base="`$BASENAME "$path"`"
27551        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27552      fi
27553    fi
27554  fi
27555
27556            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27557$as_echo_n "checking for Boot JDK... " >&6; }
27558            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27559$as_echo "$BOOT_JDK" >&6; }
27560            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27561$as_echo_n "checking Boot JDK version... " >&6; }
27562            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27563            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27564$as_echo "$BOOT_JDK_VERSION" >&6; }
27565          fi # end check jdk version
27566        fi # end check javac
27567      fi # end check java
27568    fi # end check boot jdk found
27569  fi
27570
27571    done
27572  fi
27573
27574  fi
27575
27576
27577    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27578    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27579      # Do we have a bin/java?
27580      if test ! -x "$BOOT_JDK/bin/java"; then
27581        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27582$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27583        BOOT_JDK_FOUND=no
27584      else
27585        # Do we have a bin/javac?
27586        if test ! -x "$BOOT_JDK/bin/javac"; then
27587          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27588$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27589          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27590$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27591          BOOT_JDK_FOUND=no
27592        else
27593          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27594          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27595
27596          # Extra M4 quote needed to protect [] in grep expression.
27597          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27598          if test "x$FOUND_CORRECT_VERSION" = x; then
27599            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27600$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27601            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27602$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27603            BOOT_JDK_FOUND=no
27604          else
27605            # We're done! :-)
27606            BOOT_JDK_FOUND=yes
27607
27608  # Only process if variable expands to non-empty
27609
27610  if test "x$BOOT_JDK" != x; then
27611    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27612
27613  # Input might be given as Windows format, start by converting to
27614  # unix format.
27615  path="$BOOT_JDK"
27616  new_path=`$CYGPATH -u "$path"`
27617
27618  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27619  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27620  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27621  # "foo.exe" is OK but "foo" is an error.
27622  #
27623  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27624  # It is also a way to make sure we got the proper file name for the real test later on.
27625  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27626  if test "x$test_shortpath" = x; then
27627    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27628$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27629    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27630  fi
27631
27632  # Call helper function which possibly converts this using DOS-style short mode.
27633  # If so, the updated path is stored in $new_path.
27634
27635  input_path="$new_path"
27636  # Check if we need to convert this using DOS-style short mode. If the path
27637  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27638  # take no chances and rewrite it.
27639  # Note: m4 eats our [], so we need to use [ and ] instead.
27640  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27641  if test "x$has_forbidden_chars" != x; then
27642    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27643    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27644    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27645    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27646      # Going to short mode and back again did indeed matter. Since short mode is
27647      # case insensitive, let's make it lowercase to improve readability.
27648      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27649      # Now convert it back to Unix-style (cygpath)
27650      input_path=`$CYGPATH -u "$shortmode_path"`
27651      new_path="$input_path"
27652    fi
27653  fi
27654
27655  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27656  if test "x$test_cygdrive_prefix" = x; then
27657    # As a simple fix, exclude /usr/bin since it's not a real path.
27658    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27659      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27660      # a path prefixed by /cygdrive for fixpath to work.
27661      new_path="$CYGWIN_ROOT_PATH$input_path"
27662    fi
27663  fi
27664
27665
27666  if test "x$path" != "x$new_path"; then
27667    BOOT_JDK="$new_path"
27668    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27669$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27670  fi
27671
27672    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27673
27674  path="$BOOT_JDK"
27675  has_colon=`$ECHO $path | $GREP ^.:`
27676  new_path="$path"
27677  if test "x$has_colon" = x; then
27678    # Not in mixed or Windows style, start by that.
27679    new_path=`cmd //c echo $path`
27680  fi
27681
27682
27683  input_path="$new_path"
27684  # Check if we need to convert this using DOS-style short mode. If the path
27685  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27686  # take no chances and rewrite it.
27687  # Note: m4 eats our [], so we need to use [ and ] instead.
27688  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27689  if test "x$has_forbidden_chars" != x; then
27690    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27691    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27692  fi
27693
27694
27695  windows_path="$new_path"
27696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27697    unix_path=`$CYGPATH -u "$windows_path"`
27698    new_path="$unix_path"
27699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27700    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27701    new_path="$unix_path"
27702  fi
27703
27704  if test "x$path" != "x$new_path"; then
27705    BOOT_JDK="$new_path"
27706    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27707$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27708  fi
27709
27710  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27711  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27712
27713    else
27714      # We're on a unix platform. Hooray! :)
27715      path="$BOOT_JDK"
27716      has_space=`$ECHO "$path" | $GREP " "`
27717      if test "x$has_space" != x; then
27718        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27719$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27720        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27721      fi
27722
27723      # Use eval to expand a potential ~
27724      eval path="$path"
27725      if test ! -f "$path" && test ! -d "$path"; then
27726        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27727      fi
27728
27729      if test -d "$path"; then
27730        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27731      else
27732        dir="`$DIRNAME "$path"`"
27733        base="`$BASENAME "$path"`"
27734        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27735      fi
27736    fi
27737  fi
27738
27739            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27740$as_echo_n "checking for Boot JDK... " >&6; }
27741            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27742$as_echo "$BOOT_JDK" >&6; }
27743            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27744$as_echo_n "checking Boot JDK version... " >&6; }
27745            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27746            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27747$as_echo "$BOOT_JDK_VERSION" >&6; }
27748          fi # end check jdk version
27749        fi # end check javac
27750      fi # end check java
27751    fi # end check boot jdk found
27752  fi
27753
27754
27755  if test "x$BOOT_JDK_FOUND" = xno; then
27756    # Now execute the test
27757
27758  if test "x$ProgramFiles" != x; then
27759    VIRTUAL_DIR="$ProgramFiles/Java"
27760
27761  windows_path="$VIRTUAL_DIR"
27762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27763    unix_path=`$CYGPATH -u "$windows_path"`
27764    VIRTUAL_DIR="$unix_path"
27765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27766    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27767    VIRTUAL_DIR="$unix_path"
27768  fi
27769
27770
27771  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27772  BOOT_JDK_SUFFIX=""
27773  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27774  if test "x$ALL_JDKS_FOUND" != x; then
27775    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27776
27777  if test "x$BOOT_JDK_FOUND" = xno; then
27778    # Now execute the test
27779
27780        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27781        if test -d "$BOOT_JDK"; then
27782          BOOT_JDK_FOUND=maybe
27783          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27784$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27785        fi
27786
27787
27788    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27789    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27790      # Do we have a bin/java?
27791      if test ! -x "$BOOT_JDK/bin/java"; then
27792        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27793$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27794        BOOT_JDK_FOUND=no
27795      else
27796        # Do we have a bin/javac?
27797        if test ! -x "$BOOT_JDK/bin/javac"; then
27798          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27799$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27800          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27801$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27802          BOOT_JDK_FOUND=no
27803        else
27804          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27805          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27806
27807          # Extra M4 quote needed to protect [] in grep expression.
27808          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27809          if test "x$FOUND_CORRECT_VERSION" = x; then
27810            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27811$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27812            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27813$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27814            BOOT_JDK_FOUND=no
27815          else
27816            # We're done! :-)
27817            BOOT_JDK_FOUND=yes
27818
27819  # Only process if variable expands to non-empty
27820
27821  if test "x$BOOT_JDK" != x; then
27822    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27823
27824  # Input might be given as Windows format, start by converting to
27825  # unix format.
27826  path="$BOOT_JDK"
27827  new_path=`$CYGPATH -u "$path"`
27828
27829  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27830  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27831  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27832  # "foo.exe" is OK but "foo" is an error.
27833  #
27834  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27835  # It is also a way to make sure we got the proper file name for the real test later on.
27836  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27837  if test "x$test_shortpath" = x; then
27838    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27839$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27840    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27841  fi
27842
27843  # Call helper function which possibly converts this using DOS-style short mode.
27844  # If so, the updated path is stored in $new_path.
27845
27846  input_path="$new_path"
27847  # Check if we need to convert this using DOS-style short mode. If the path
27848  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27849  # take no chances and rewrite it.
27850  # Note: m4 eats our [], so we need to use [ and ] instead.
27851  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27852  if test "x$has_forbidden_chars" != x; then
27853    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27854    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27855    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27856    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27857      # Going to short mode and back again did indeed matter. Since short mode is
27858      # case insensitive, let's make it lowercase to improve readability.
27859      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27860      # Now convert it back to Unix-style (cygpath)
27861      input_path=`$CYGPATH -u "$shortmode_path"`
27862      new_path="$input_path"
27863    fi
27864  fi
27865
27866  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27867  if test "x$test_cygdrive_prefix" = x; then
27868    # As a simple fix, exclude /usr/bin since it's not a real path.
27869    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27870      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27871      # a path prefixed by /cygdrive for fixpath to work.
27872      new_path="$CYGWIN_ROOT_PATH$input_path"
27873    fi
27874  fi
27875
27876
27877  if test "x$path" != "x$new_path"; then
27878    BOOT_JDK="$new_path"
27879    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27880$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27881  fi
27882
27883    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27884
27885  path="$BOOT_JDK"
27886  has_colon=`$ECHO $path | $GREP ^.:`
27887  new_path="$path"
27888  if test "x$has_colon" = x; then
27889    # Not in mixed or Windows style, start by that.
27890    new_path=`cmd //c echo $path`
27891  fi
27892
27893
27894  input_path="$new_path"
27895  # Check if we need to convert this using DOS-style short mode. If the path
27896  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27897  # take no chances and rewrite it.
27898  # Note: m4 eats our [], so we need to use [ and ] instead.
27899  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27900  if test "x$has_forbidden_chars" != x; then
27901    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27902    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27903  fi
27904
27905
27906  windows_path="$new_path"
27907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27908    unix_path=`$CYGPATH -u "$windows_path"`
27909    new_path="$unix_path"
27910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27912    new_path="$unix_path"
27913  fi
27914
27915  if test "x$path" != "x$new_path"; then
27916    BOOT_JDK="$new_path"
27917    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27918$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27919  fi
27920
27921  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27922  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27923
27924    else
27925      # We're on a unix platform. Hooray! :)
27926      path="$BOOT_JDK"
27927      has_space=`$ECHO "$path" | $GREP " "`
27928      if test "x$has_space" != x; then
27929        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27930$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27931        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27932      fi
27933
27934      # Use eval to expand a potential ~
27935      eval path="$path"
27936      if test ! -f "$path" && test ! -d "$path"; then
27937        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27938      fi
27939
27940      if test -d "$path"; then
27941        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27942      else
27943        dir="`$DIRNAME "$path"`"
27944        base="`$BASENAME "$path"`"
27945        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27946      fi
27947    fi
27948  fi
27949
27950            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27951$as_echo_n "checking for Boot JDK... " >&6; }
27952            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27953$as_echo "$BOOT_JDK" >&6; }
27954            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27955$as_echo_n "checking Boot JDK version... " >&6; }
27956            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27957            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27958$as_echo "$BOOT_JDK_VERSION" >&6; }
27959          fi # end check jdk version
27960        fi # end check javac
27961      fi # end check java
27962    fi # end check boot jdk found
27963  fi
27964
27965    done
27966  fi
27967
27968  fi
27969
27970
27971    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27972    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27973      # Do we have a bin/java?
27974      if test ! -x "$BOOT_JDK/bin/java"; then
27975        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27976$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27977        BOOT_JDK_FOUND=no
27978      else
27979        # Do we have a bin/javac?
27980        if test ! -x "$BOOT_JDK/bin/javac"; then
27981          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27982$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27983          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27984$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27985          BOOT_JDK_FOUND=no
27986        else
27987          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27988          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27989
27990          # Extra M4 quote needed to protect [] in grep expression.
27991          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27992          if test "x$FOUND_CORRECT_VERSION" = x; then
27993            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27994$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27995            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27996$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27997            BOOT_JDK_FOUND=no
27998          else
27999            # We're done! :-)
28000            BOOT_JDK_FOUND=yes
28001
28002  # Only process if variable expands to non-empty
28003
28004  if test "x$BOOT_JDK" != x; then
28005    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28006
28007  # Input might be given as Windows format, start by converting to
28008  # unix format.
28009  path="$BOOT_JDK"
28010  new_path=`$CYGPATH -u "$path"`
28011
28012  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28013  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28014  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28015  # "foo.exe" is OK but "foo" is an error.
28016  #
28017  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28018  # It is also a way to make sure we got the proper file name for the real test later on.
28019  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28020  if test "x$test_shortpath" = x; then
28021    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28022$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28023    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28024  fi
28025
28026  # Call helper function which possibly converts this using DOS-style short mode.
28027  # If so, the updated path is stored in $new_path.
28028
28029  input_path="$new_path"
28030  # Check if we need to convert this using DOS-style short mode. If the path
28031  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28032  # take no chances and rewrite it.
28033  # Note: m4 eats our [], so we need to use [ and ] instead.
28034  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28035  if test "x$has_forbidden_chars" != x; then
28036    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28037    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28038    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28039    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28040      # Going to short mode and back again did indeed matter. Since short mode is
28041      # case insensitive, let's make it lowercase to improve readability.
28042      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28043      # Now convert it back to Unix-style (cygpath)
28044      input_path=`$CYGPATH -u "$shortmode_path"`
28045      new_path="$input_path"
28046    fi
28047  fi
28048
28049  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28050  if test "x$test_cygdrive_prefix" = x; then
28051    # As a simple fix, exclude /usr/bin since it's not a real path.
28052    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28053      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28054      # a path prefixed by /cygdrive for fixpath to work.
28055      new_path="$CYGWIN_ROOT_PATH$input_path"
28056    fi
28057  fi
28058
28059
28060  if test "x$path" != "x$new_path"; then
28061    BOOT_JDK="$new_path"
28062    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28063$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28064  fi
28065
28066    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28067
28068  path="$BOOT_JDK"
28069  has_colon=`$ECHO $path | $GREP ^.:`
28070  new_path="$path"
28071  if test "x$has_colon" = x; then
28072    # Not in mixed or Windows style, start by that.
28073    new_path=`cmd //c echo $path`
28074  fi
28075
28076
28077  input_path="$new_path"
28078  # Check if we need to convert this using DOS-style short mode. If the path
28079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28080  # take no chances and rewrite it.
28081  # Note: m4 eats our [], so we need to use [ and ] instead.
28082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28083  if test "x$has_forbidden_chars" != x; then
28084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28085    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28086  fi
28087
28088
28089  windows_path="$new_path"
28090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28091    unix_path=`$CYGPATH -u "$windows_path"`
28092    new_path="$unix_path"
28093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28094    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28095    new_path="$unix_path"
28096  fi
28097
28098  if test "x$path" != "x$new_path"; then
28099    BOOT_JDK="$new_path"
28100    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28101$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28102  fi
28103
28104  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28105  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28106
28107    else
28108      # We're on a unix platform. Hooray! :)
28109      path="$BOOT_JDK"
28110      has_space=`$ECHO "$path" | $GREP " "`
28111      if test "x$has_space" != x; then
28112        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28113$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28114        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28115      fi
28116
28117      # Use eval to expand a potential ~
28118      eval path="$path"
28119      if test ! -f "$path" && test ! -d "$path"; then
28120        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28121      fi
28122
28123      if test -d "$path"; then
28124        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28125      else
28126        dir="`$DIRNAME "$path"`"
28127        base="`$BASENAME "$path"`"
28128        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28129      fi
28130    fi
28131  fi
28132
28133            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28134$as_echo_n "checking for Boot JDK... " >&6; }
28135            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28136$as_echo "$BOOT_JDK" >&6; }
28137            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28138$as_echo_n "checking Boot JDK version... " >&6; }
28139            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28140            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28141$as_echo "$BOOT_JDK_VERSION" >&6; }
28142          fi # end check jdk version
28143        fi # end check javac
28144      fi # end check java
28145    fi # end check boot jdk found
28146  fi
28147
28148
28149  if test "x$BOOT_JDK_FOUND" = xno; then
28150    # Now execute the test
28151
28152  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28153  BOOT_JDK_SUFFIX=""
28154  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28155  if test "x$ALL_JDKS_FOUND" != x; then
28156    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28157
28158  if test "x$BOOT_JDK_FOUND" = xno; then
28159    # Now execute the test
28160
28161        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28162        if test -d "$BOOT_JDK"; then
28163          BOOT_JDK_FOUND=maybe
28164          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28165$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28166        fi
28167
28168
28169    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28170    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28171      # Do we have a bin/java?
28172      if test ! -x "$BOOT_JDK/bin/java"; then
28173        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28174$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28175        BOOT_JDK_FOUND=no
28176      else
28177        # Do we have a bin/javac?
28178        if test ! -x "$BOOT_JDK/bin/javac"; then
28179          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28180$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28181          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28182$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28183          BOOT_JDK_FOUND=no
28184        else
28185          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28186          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28187
28188          # Extra M4 quote needed to protect [] in grep expression.
28189          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28190          if test "x$FOUND_CORRECT_VERSION" = x; then
28191            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28192$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28193            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28194$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28195            BOOT_JDK_FOUND=no
28196          else
28197            # We're done! :-)
28198            BOOT_JDK_FOUND=yes
28199
28200  # Only process if variable expands to non-empty
28201
28202  if test "x$BOOT_JDK" != x; then
28203    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28204
28205  # Input might be given as Windows format, start by converting to
28206  # unix format.
28207  path="$BOOT_JDK"
28208  new_path=`$CYGPATH -u "$path"`
28209
28210  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28211  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28212  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28213  # "foo.exe" is OK but "foo" is an error.
28214  #
28215  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28216  # It is also a way to make sure we got the proper file name for the real test later on.
28217  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28218  if test "x$test_shortpath" = x; then
28219    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28220$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28221    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28222  fi
28223
28224  # Call helper function which possibly converts this using DOS-style short mode.
28225  # If so, the updated path is stored in $new_path.
28226
28227  input_path="$new_path"
28228  # Check if we need to convert this using DOS-style short mode. If the path
28229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28230  # take no chances and rewrite it.
28231  # Note: m4 eats our [], so we need to use [ and ] instead.
28232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28233  if test "x$has_forbidden_chars" != x; then
28234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28235    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28236    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28237    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28238      # Going to short mode and back again did indeed matter. Since short mode is
28239      # case insensitive, let's make it lowercase to improve readability.
28240      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28241      # Now convert it back to Unix-style (cygpath)
28242      input_path=`$CYGPATH -u "$shortmode_path"`
28243      new_path="$input_path"
28244    fi
28245  fi
28246
28247  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28248  if test "x$test_cygdrive_prefix" = x; then
28249    # As a simple fix, exclude /usr/bin since it's not a real path.
28250    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28251      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28252      # a path prefixed by /cygdrive for fixpath to work.
28253      new_path="$CYGWIN_ROOT_PATH$input_path"
28254    fi
28255  fi
28256
28257
28258  if test "x$path" != "x$new_path"; then
28259    BOOT_JDK="$new_path"
28260    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28261$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28262  fi
28263
28264    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28265
28266  path="$BOOT_JDK"
28267  has_colon=`$ECHO $path | $GREP ^.:`
28268  new_path="$path"
28269  if test "x$has_colon" = x; then
28270    # Not in mixed or Windows style, start by that.
28271    new_path=`cmd //c echo $path`
28272  fi
28273
28274
28275  input_path="$new_path"
28276  # Check if we need to convert this using DOS-style short mode. If the path
28277  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28278  # take no chances and rewrite it.
28279  # Note: m4 eats our [], so we need to use [ and ] instead.
28280  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28281  if test "x$has_forbidden_chars" != x; then
28282    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28283    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28284  fi
28285
28286
28287  windows_path="$new_path"
28288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28289    unix_path=`$CYGPATH -u "$windows_path"`
28290    new_path="$unix_path"
28291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28293    new_path="$unix_path"
28294  fi
28295
28296  if test "x$path" != "x$new_path"; then
28297    BOOT_JDK="$new_path"
28298    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28299$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28300  fi
28301
28302  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28303  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28304
28305    else
28306      # We're on a unix platform. Hooray! :)
28307      path="$BOOT_JDK"
28308      has_space=`$ECHO "$path" | $GREP " "`
28309      if test "x$has_space" != x; then
28310        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28311$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28312        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28313      fi
28314
28315      # Use eval to expand a potential ~
28316      eval path="$path"
28317      if test ! -f "$path" && test ! -d "$path"; then
28318        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28319      fi
28320
28321      if test -d "$path"; then
28322        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28323      else
28324        dir="`$DIRNAME "$path"`"
28325        base="`$BASENAME "$path"`"
28326        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28327      fi
28328    fi
28329  fi
28330
28331            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28332$as_echo_n "checking for Boot JDK... " >&6; }
28333            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28334$as_echo "$BOOT_JDK" >&6; }
28335            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28336$as_echo_n "checking Boot JDK version... " >&6; }
28337            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28338            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28339$as_echo "$BOOT_JDK_VERSION" >&6; }
28340          fi # end check jdk version
28341        fi # end check javac
28342      fi # end check java
28343    fi # end check boot jdk found
28344  fi
28345
28346    done
28347  fi
28348
28349
28350    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28351    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28352      # Do we have a bin/java?
28353      if test ! -x "$BOOT_JDK/bin/java"; then
28354        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28355$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28356        BOOT_JDK_FOUND=no
28357      else
28358        # Do we have a bin/javac?
28359        if test ! -x "$BOOT_JDK/bin/javac"; then
28360          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28361$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28362          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28363$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28364          BOOT_JDK_FOUND=no
28365        else
28366          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28367          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28368
28369          # Extra M4 quote needed to protect [] in grep expression.
28370          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28371          if test "x$FOUND_CORRECT_VERSION" = x; then
28372            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28373$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28374            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28375$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28376            BOOT_JDK_FOUND=no
28377          else
28378            # We're done! :-)
28379            BOOT_JDK_FOUND=yes
28380
28381  # Only process if variable expands to non-empty
28382
28383  if test "x$BOOT_JDK" != x; then
28384    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28385
28386  # Input might be given as Windows format, start by converting to
28387  # unix format.
28388  path="$BOOT_JDK"
28389  new_path=`$CYGPATH -u "$path"`
28390
28391  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28392  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28393  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28394  # "foo.exe" is OK but "foo" is an error.
28395  #
28396  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28397  # It is also a way to make sure we got the proper file name for the real test later on.
28398  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28399  if test "x$test_shortpath" = x; then
28400    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28401$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28402    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28403  fi
28404
28405  # Call helper function which possibly converts this using DOS-style short mode.
28406  # If so, the updated path is stored in $new_path.
28407
28408  input_path="$new_path"
28409  # Check if we need to convert this using DOS-style short mode. If the path
28410  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28411  # take no chances and rewrite it.
28412  # Note: m4 eats our [], so we need to use [ and ] instead.
28413  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28414  if test "x$has_forbidden_chars" != x; then
28415    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28416    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28417    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28418    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28419      # Going to short mode and back again did indeed matter. Since short mode is
28420      # case insensitive, let's make it lowercase to improve readability.
28421      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28422      # Now convert it back to Unix-style (cygpath)
28423      input_path=`$CYGPATH -u "$shortmode_path"`
28424      new_path="$input_path"
28425    fi
28426  fi
28427
28428  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28429  if test "x$test_cygdrive_prefix" = x; then
28430    # As a simple fix, exclude /usr/bin since it's not a real path.
28431    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28432      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28433      # a path prefixed by /cygdrive for fixpath to work.
28434      new_path="$CYGWIN_ROOT_PATH$input_path"
28435    fi
28436  fi
28437
28438
28439  if test "x$path" != "x$new_path"; then
28440    BOOT_JDK="$new_path"
28441    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28442$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28443  fi
28444
28445    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28446
28447  path="$BOOT_JDK"
28448  has_colon=`$ECHO $path | $GREP ^.:`
28449  new_path="$path"
28450  if test "x$has_colon" = x; then
28451    # Not in mixed or Windows style, start by that.
28452    new_path=`cmd //c echo $path`
28453  fi
28454
28455
28456  input_path="$new_path"
28457  # Check if we need to convert this using DOS-style short mode. If the path
28458  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28459  # take no chances and rewrite it.
28460  # Note: m4 eats our [], so we need to use [ and ] instead.
28461  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28462  if test "x$has_forbidden_chars" != x; then
28463    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28464    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28465  fi
28466
28467
28468  windows_path="$new_path"
28469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28470    unix_path=`$CYGPATH -u "$windows_path"`
28471    new_path="$unix_path"
28472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28473    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28474    new_path="$unix_path"
28475  fi
28476
28477  if test "x$path" != "x$new_path"; then
28478    BOOT_JDK="$new_path"
28479    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28480$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28481  fi
28482
28483  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28484  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28485
28486    else
28487      # We're on a unix platform. Hooray! :)
28488      path="$BOOT_JDK"
28489      has_space=`$ECHO "$path" | $GREP " "`
28490      if test "x$has_space" != x; then
28491        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28492$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28493        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28494      fi
28495
28496      # Use eval to expand a potential ~
28497      eval path="$path"
28498      if test ! -f "$path" && test ! -d "$path"; then
28499        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28500      fi
28501
28502      if test -d "$path"; then
28503        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28504      else
28505        dir="`$DIRNAME "$path"`"
28506        base="`$BASENAME "$path"`"
28507        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28508      fi
28509    fi
28510  fi
28511
28512            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28513$as_echo_n "checking for Boot JDK... " >&6; }
28514            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28515$as_echo "$BOOT_JDK" >&6; }
28516            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28517$as_echo_n "checking Boot JDK version... " >&6; }
28518            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28519            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28520$as_echo "$BOOT_JDK_VERSION" >&6; }
28521          fi # end check jdk version
28522        fi # end check javac
28523      fi # end check java
28524    fi # end check boot jdk found
28525  fi
28526
28527  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28528
28529  if test "x$BOOT_JDK_FOUND" = xno; then
28530    # Now execute the test
28531
28532  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28533  BOOT_JDK_SUFFIX="/Contents/Home"
28534  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28535  if test "x$ALL_JDKS_FOUND" != x; then
28536    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28537
28538  if test "x$BOOT_JDK_FOUND" = xno; then
28539    # Now execute the test
28540
28541        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28542        if test -d "$BOOT_JDK"; then
28543          BOOT_JDK_FOUND=maybe
28544          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28545$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28546        fi
28547
28548
28549    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28550    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28551      # Do we have a bin/java?
28552      if test ! -x "$BOOT_JDK/bin/java"; then
28553        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28554$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28555        BOOT_JDK_FOUND=no
28556      else
28557        # Do we have a bin/javac?
28558        if test ! -x "$BOOT_JDK/bin/javac"; then
28559          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28560$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28561          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28562$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28563          BOOT_JDK_FOUND=no
28564        else
28565          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28566          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28567
28568          # Extra M4 quote needed to protect [] in grep expression.
28569          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28570          if test "x$FOUND_CORRECT_VERSION" = x; then
28571            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28572$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28573            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28574$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28575            BOOT_JDK_FOUND=no
28576          else
28577            # We're done! :-)
28578            BOOT_JDK_FOUND=yes
28579
28580  # Only process if variable expands to non-empty
28581
28582  if test "x$BOOT_JDK" != x; then
28583    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28584
28585  # Input might be given as Windows format, start by converting to
28586  # unix format.
28587  path="$BOOT_JDK"
28588  new_path=`$CYGPATH -u "$path"`
28589
28590  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28591  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28592  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28593  # "foo.exe" is OK but "foo" is an error.
28594  #
28595  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28596  # It is also a way to make sure we got the proper file name for the real test later on.
28597  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28598  if test "x$test_shortpath" = x; then
28599    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28600$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28601    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28602  fi
28603
28604  # Call helper function which possibly converts this using DOS-style short mode.
28605  # If so, the updated path is stored in $new_path.
28606
28607  input_path="$new_path"
28608  # Check if we need to convert this using DOS-style short mode. If the path
28609  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28610  # take no chances and rewrite it.
28611  # Note: m4 eats our [], so we need to use [ and ] instead.
28612  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28613  if test "x$has_forbidden_chars" != x; then
28614    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28615    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28616    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28617    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28618      # Going to short mode and back again did indeed matter. Since short mode is
28619      # case insensitive, let's make it lowercase to improve readability.
28620      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28621      # Now convert it back to Unix-style (cygpath)
28622      input_path=`$CYGPATH -u "$shortmode_path"`
28623      new_path="$input_path"
28624    fi
28625  fi
28626
28627  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28628  if test "x$test_cygdrive_prefix" = x; then
28629    # As a simple fix, exclude /usr/bin since it's not a real path.
28630    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28631      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28632      # a path prefixed by /cygdrive for fixpath to work.
28633      new_path="$CYGWIN_ROOT_PATH$input_path"
28634    fi
28635  fi
28636
28637
28638  if test "x$path" != "x$new_path"; then
28639    BOOT_JDK="$new_path"
28640    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28641$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28642  fi
28643
28644    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28645
28646  path="$BOOT_JDK"
28647  has_colon=`$ECHO $path | $GREP ^.:`
28648  new_path="$path"
28649  if test "x$has_colon" = x; then
28650    # Not in mixed or Windows style, start by that.
28651    new_path=`cmd //c echo $path`
28652  fi
28653
28654
28655  input_path="$new_path"
28656  # Check if we need to convert this using DOS-style short mode. If the path
28657  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28658  # take no chances and rewrite it.
28659  # Note: m4 eats our [], so we need to use [ and ] instead.
28660  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28661  if test "x$has_forbidden_chars" != x; then
28662    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28663    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28664  fi
28665
28666
28667  windows_path="$new_path"
28668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28669    unix_path=`$CYGPATH -u "$windows_path"`
28670    new_path="$unix_path"
28671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28672    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28673    new_path="$unix_path"
28674  fi
28675
28676  if test "x$path" != "x$new_path"; then
28677    BOOT_JDK="$new_path"
28678    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28679$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28680  fi
28681
28682  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28683  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28684
28685    else
28686      # We're on a unix platform. Hooray! :)
28687      path="$BOOT_JDK"
28688      has_space=`$ECHO "$path" | $GREP " "`
28689      if test "x$has_space" != x; then
28690        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28691$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28692        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28693      fi
28694
28695      # Use eval to expand a potential ~
28696      eval path="$path"
28697      if test ! -f "$path" && test ! -d "$path"; then
28698        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28699      fi
28700
28701      if test -d "$path"; then
28702        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28703      else
28704        dir="`$DIRNAME "$path"`"
28705        base="`$BASENAME "$path"`"
28706        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28707      fi
28708    fi
28709  fi
28710
28711            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28712$as_echo_n "checking for Boot JDK... " >&6; }
28713            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28714$as_echo "$BOOT_JDK" >&6; }
28715            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28716$as_echo_n "checking Boot JDK version... " >&6; }
28717            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28718            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28719$as_echo "$BOOT_JDK_VERSION" >&6; }
28720          fi # end check jdk version
28721        fi # end check javac
28722      fi # end check java
28723    fi # end check boot jdk found
28724  fi
28725
28726    done
28727  fi
28728
28729
28730    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28731    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28732      # Do we have a bin/java?
28733      if test ! -x "$BOOT_JDK/bin/java"; then
28734        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28735$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28736        BOOT_JDK_FOUND=no
28737      else
28738        # Do we have a bin/javac?
28739        if test ! -x "$BOOT_JDK/bin/javac"; then
28740          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28741$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28742          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28743$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28744          BOOT_JDK_FOUND=no
28745        else
28746          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28747          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28748
28749          # Extra M4 quote needed to protect [] in grep expression.
28750          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28751          if test "x$FOUND_CORRECT_VERSION" = x; then
28752            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28753$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28754            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28755$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28756            BOOT_JDK_FOUND=no
28757          else
28758            # We're done! :-)
28759            BOOT_JDK_FOUND=yes
28760
28761  # Only process if variable expands to non-empty
28762
28763  if test "x$BOOT_JDK" != x; then
28764    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28765
28766  # Input might be given as Windows format, start by converting to
28767  # unix format.
28768  path="$BOOT_JDK"
28769  new_path=`$CYGPATH -u "$path"`
28770
28771  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28772  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28773  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28774  # "foo.exe" is OK but "foo" is an error.
28775  #
28776  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28777  # It is also a way to make sure we got the proper file name for the real test later on.
28778  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28779  if test "x$test_shortpath" = x; then
28780    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28781$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28782    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28783  fi
28784
28785  # Call helper function which possibly converts this using DOS-style short mode.
28786  # If so, the updated path is stored in $new_path.
28787
28788  input_path="$new_path"
28789  # Check if we need to convert this using DOS-style short mode. If the path
28790  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28791  # take no chances and rewrite it.
28792  # Note: m4 eats our [], so we need to use [ and ] instead.
28793  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28794  if test "x$has_forbidden_chars" != x; then
28795    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28796    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28797    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28798    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28799      # Going to short mode and back again did indeed matter. Since short mode is
28800      # case insensitive, let's make it lowercase to improve readability.
28801      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28802      # Now convert it back to Unix-style (cygpath)
28803      input_path=`$CYGPATH -u "$shortmode_path"`
28804      new_path="$input_path"
28805    fi
28806  fi
28807
28808  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28809  if test "x$test_cygdrive_prefix" = x; then
28810    # As a simple fix, exclude /usr/bin since it's not a real path.
28811    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28812      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28813      # a path prefixed by /cygdrive for fixpath to work.
28814      new_path="$CYGWIN_ROOT_PATH$input_path"
28815    fi
28816  fi
28817
28818
28819  if test "x$path" != "x$new_path"; then
28820    BOOT_JDK="$new_path"
28821    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28822$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28823  fi
28824
28825    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28826
28827  path="$BOOT_JDK"
28828  has_colon=`$ECHO $path | $GREP ^.:`
28829  new_path="$path"
28830  if test "x$has_colon" = x; then
28831    # Not in mixed or Windows style, start by that.
28832    new_path=`cmd //c echo $path`
28833  fi
28834
28835
28836  input_path="$new_path"
28837  # Check if we need to convert this using DOS-style short mode. If the path
28838  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28839  # take no chances and rewrite it.
28840  # Note: m4 eats our [], so we need to use [ and ] instead.
28841  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28842  if test "x$has_forbidden_chars" != x; then
28843    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28844    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28845  fi
28846
28847
28848  windows_path="$new_path"
28849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28850    unix_path=`$CYGPATH -u "$windows_path"`
28851    new_path="$unix_path"
28852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28854    new_path="$unix_path"
28855  fi
28856
28857  if test "x$path" != "x$new_path"; then
28858    BOOT_JDK="$new_path"
28859    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28860$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28861  fi
28862
28863  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28864  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28865
28866    else
28867      # We're on a unix platform. Hooray! :)
28868      path="$BOOT_JDK"
28869      has_space=`$ECHO "$path" | $GREP " "`
28870      if test "x$has_space" != x; then
28871        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28872$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28873        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28874      fi
28875
28876      # Use eval to expand a potential ~
28877      eval path="$path"
28878      if test ! -f "$path" && test ! -d "$path"; then
28879        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28880      fi
28881
28882      if test -d "$path"; then
28883        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28884      else
28885        dir="`$DIRNAME "$path"`"
28886        base="`$BASENAME "$path"`"
28887        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28888      fi
28889    fi
28890  fi
28891
28892            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28893$as_echo_n "checking for Boot JDK... " >&6; }
28894            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28895$as_echo "$BOOT_JDK" >&6; }
28896            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28897$as_echo_n "checking Boot JDK version... " >&6; }
28898            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28899            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28900$as_echo "$BOOT_JDK_VERSION" >&6; }
28901          fi # end check jdk version
28902        fi # end check javac
28903      fi # end check java
28904    fi # end check boot jdk found
28905  fi
28906
28907
28908  if test "x$BOOT_JDK_FOUND" = xno; then
28909    # Now execute the test
28910
28911  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28912  BOOT_JDK_SUFFIX="/Contents/Home"
28913  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28914  if test "x$ALL_JDKS_FOUND" != x; then
28915    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28916
28917  if test "x$BOOT_JDK_FOUND" = xno; then
28918    # Now execute the test
28919
28920        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28921        if test -d "$BOOT_JDK"; then
28922          BOOT_JDK_FOUND=maybe
28923          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28924$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28925        fi
28926
28927
28928    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28929    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28930      # Do we have a bin/java?
28931      if test ! -x "$BOOT_JDK/bin/java"; then
28932        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28933$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28934        BOOT_JDK_FOUND=no
28935      else
28936        # Do we have a bin/javac?
28937        if test ! -x "$BOOT_JDK/bin/javac"; then
28938          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28939$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28940          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28941$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28942          BOOT_JDK_FOUND=no
28943        else
28944          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28945          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28946
28947          # Extra M4 quote needed to protect [] in grep expression.
28948          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28949          if test "x$FOUND_CORRECT_VERSION" = x; then
28950            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28951$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28952            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28953$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28954            BOOT_JDK_FOUND=no
28955          else
28956            # We're done! :-)
28957            BOOT_JDK_FOUND=yes
28958
28959  # Only process if variable expands to non-empty
28960
28961  if test "x$BOOT_JDK" != x; then
28962    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28963
28964  # Input might be given as Windows format, start by converting to
28965  # unix format.
28966  path="$BOOT_JDK"
28967  new_path=`$CYGPATH -u "$path"`
28968
28969  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28970  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28971  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28972  # "foo.exe" is OK but "foo" is an error.
28973  #
28974  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28975  # It is also a way to make sure we got the proper file name for the real test later on.
28976  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28977  if test "x$test_shortpath" = x; then
28978    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28979$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28980    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28981  fi
28982
28983  # Call helper function which possibly converts this using DOS-style short mode.
28984  # If so, the updated path is stored in $new_path.
28985
28986  input_path="$new_path"
28987  # Check if we need to convert this using DOS-style short mode. If the path
28988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28989  # take no chances and rewrite it.
28990  # Note: m4 eats our [], so we need to use [ and ] instead.
28991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28992  if test "x$has_forbidden_chars" != x; then
28993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28994    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28995    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28996    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28997      # Going to short mode and back again did indeed matter. Since short mode is
28998      # case insensitive, let's make it lowercase to improve readability.
28999      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29000      # Now convert it back to Unix-style (cygpath)
29001      input_path=`$CYGPATH -u "$shortmode_path"`
29002      new_path="$input_path"
29003    fi
29004  fi
29005
29006  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29007  if test "x$test_cygdrive_prefix" = x; then
29008    # As a simple fix, exclude /usr/bin since it's not a real path.
29009    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29010      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29011      # a path prefixed by /cygdrive for fixpath to work.
29012      new_path="$CYGWIN_ROOT_PATH$input_path"
29013    fi
29014  fi
29015
29016
29017  if test "x$path" != "x$new_path"; then
29018    BOOT_JDK="$new_path"
29019    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29020$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29021  fi
29022
29023    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29024
29025  path="$BOOT_JDK"
29026  has_colon=`$ECHO $path | $GREP ^.:`
29027  new_path="$path"
29028  if test "x$has_colon" = x; then
29029    # Not in mixed or Windows style, start by that.
29030    new_path=`cmd //c echo $path`
29031  fi
29032
29033
29034  input_path="$new_path"
29035  # Check if we need to convert this using DOS-style short mode. If the path
29036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29037  # take no chances and rewrite it.
29038  # Note: m4 eats our [], so we need to use [ and ] instead.
29039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29040  if test "x$has_forbidden_chars" != x; then
29041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29042    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29043  fi
29044
29045
29046  windows_path="$new_path"
29047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29048    unix_path=`$CYGPATH -u "$windows_path"`
29049    new_path="$unix_path"
29050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29052    new_path="$unix_path"
29053  fi
29054
29055  if test "x$path" != "x$new_path"; then
29056    BOOT_JDK="$new_path"
29057    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29058$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29059  fi
29060
29061  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29062  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29063
29064    else
29065      # We're on a unix platform. Hooray! :)
29066      path="$BOOT_JDK"
29067      has_space=`$ECHO "$path" | $GREP " "`
29068      if test "x$has_space" != x; then
29069        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29070$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29071        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29072      fi
29073
29074      # Use eval to expand a potential ~
29075      eval path="$path"
29076      if test ! -f "$path" && test ! -d "$path"; then
29077        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29078      fi
29079
29080      if test -d "$path"; then
29081        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29082      else
29083        dir="`$DIRNAME "$path"`"
29084        base="`$BASENAME "$path"`"
29085        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29086      fi
29087    fi
29088  fi
29089
29090            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29091$as_echo_n "checking for Boot JDK... " >&6; }
29092            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29093$as_echo "$BOOT_JDK" >&6; }
29094            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29095$as_echo_n "checking Boot JDK version... " >&6; }
29096            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29097            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29098$as_echo "$BOOT_JDK_VERSION" >&6; }
29099          fi # end check jdk version
29100        fi # end check javac
29101      fi # end check java
29102    fi # end check boot jdk found
29103  fi
29104
29105    done
29106  fi
29107
29108
29109    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29110    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29111      # Do we have a bin/java?
29112      if test ! -x "$BOOT_JDK/bin/java"; then
29113        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29114$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29115        BOOT_JDK_FOUND=no
29116      else
29117        # Do we have a bin/javac?
29118        if test ! -x "$BOOT_JDK/bin/javac"; then
29119          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29120$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29121          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29122$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29123          BOOT_JDK_FOUND=no
29124        else
29125          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29126          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29127
29128          # Extra M4 quote needed to protect [] in grep expression.
29129          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29130          if test "x$FOUND_CORRECT_VERSION" = x; then
29131            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29132$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29133            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29134$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29135            BOOT_JDK_FOUND=no
29136          else
29137            # We're done! :-)
29138            BOOT_JDK_FOUND=yes
29139
29140  # Only process if variable expands to non-empty
29141
29142  if test "x$BOOT_JDK" != x; then
29143    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29144
29145  # Input might be given as Windows format, start by converting to
29146  # unix format.
29147  path="$BOOT_JDK"
29148  new_path=`$CYGPATH -u "$path"`
29149
29150  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29151  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29152  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29153  # "foo.exe" is OK but "foo" is an error.
29154  #
29155  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29156  # It is also a way to make sure we got the proper file name for the real test later on.
29157  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29158  if test "x$test_shortpath" = x; then
29159    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29160$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29161    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29162  fi
29163
29164  # Call helper function which possibly converts this using DOS-style short mode.
29165  # If so, the updated path is stored in $new_path.
29166
29167  input_path="$new_path"
29168  # Check if we need to convert this using DOS-style short mode. If the path
29169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29170  # take no chances and rewrite it.
29171  # Note: m4 eats our [], so we need to use [ and ] instead.
29172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29173  if test "x$has_forbidden_chars" != x; then
29174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29175    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29176    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29177    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29178      # Going to short mode and back again did indeed matter. Since short mode is
29179      # case insensitive, let's make it lowercase to improve readability.
29180      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29181      # Now convert it back to Unix-style (cygpath)
29182      input_path=`$CYGPATH -u "$shortmode_path"`
29183      new_path="$input_path"
29184    fi
29185  fi
29186
29187  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29188  if test "x$test_cygdrive_prefix" = x; then
29189    # As a simple fix, exclude /usr/bin since it's not a real path.
29190    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29191      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29192      # a path prefixed by /cygdrive for fixpath to work.
29193      new_path="$CYGWIN_ROOT_PATH$input_path"
29194    fi
29195  fi
29196
29197
29198  if test "x$path" != "x$new_path"; then
29199    BOOT_JDK="$new_path"
29200    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29201$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29202  fi
29203
29204    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29205
29206  path="$BOOT_JDK"
29207  has_colon=`$ECHO $path | $GREP ^.:`
29208  new_path="$path"
29209  if test "x$has_colon" = x; then
29210    # Not in mixed or Windows style, start by that.
29211    new_path=`cmd //c echo $path`
29212  fi
29213
29214
29215  input_path="$new_path"
29216  # Check if we need to convert this using DOS-style short mode. If the path
29217  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29218  # take no chances and rewrite it.
29219  # Note: m4 eats our [], so we need to use [ and ] instead.
29220  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29221  if test "x$has_forbidden_chars" != x; then
29222    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29223    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29224  fi
29225
29226
29227  windows_path="$new_path"
29228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29229    unix_path=`$CYGPATH -u "$windows_path"`
29230    new_path="$unix_path"
29231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29233    new_path="$unix_path"
29234  fi
29235
29236  if test "x$path" != "x$new_path"; then
29237    BOOT_JDK="$new_path"
29238    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29239$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29240  fi
29241
29242  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29243  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29244
29245    else
29246      # We're on a unix platform. Hooray! :)
29247      path="$BOOT_JDK"
29248      has_space=`$ECHO "$path" | $GREP " "`
29249      if test "x$has_space" != x; then
29250        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29251$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29252        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29253      fi
29254
29255      # Use eval to expand a potential ~
29256      eval path="$path"
29257      if test ! -f "$path" && test ! -d "$path"; then
29258        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29259      fi
29260
29261      if test -d "$path"; then
29262        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29263      else
29264        dir="`$DIRNAME "$path"`"
29265        base="`$BASENAME "$path"`"
29266        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29267      fi
29268    fi
29269  fi
29270
29271            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29272$as_echo_n "checking for Boot JDK... " >&6; }
29273            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29274$as_echo "$BOOT_JDK" >&6; }
29275            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29276$as_echo_n "checking Boot JDK version... " >&6; }
29277            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29278            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29279$as_echo "$BOOT_JDK_VERSION" >&6; }
29280          fi # end check jdk version
29281        fi # end check javac
29282      fi # end check java
29283    fi # end check boot jdk found
29284  fi
29285
29286  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29287
29288  if test "x$BOOT_JDK_FOUND" = xno; then
29289    # Now execute the test
29290
29291  BOOT_JDK_PREFIX="/usr/lib/jvm"
29292  BOOT_JDK_SUFFIX=""
29293  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29294  if test "x$ALL_JDKS_FOUND" != x; then
29295    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29296
29297  if test "x$BOOT_JDK_FOUND" = xno; then
29298    # Now execute the test
29299
29300        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29301        if test -d "$BOOT_JDK"; then
29302          BOOT_JDK_FOUND=maybe
29303          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29304$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29305        fi
29306
29307
29308    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29309    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29310      # Do we have a bin/java?
29311      if test ! -x "$BOOT_JDK/bin/java"; then
29312        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29313$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29314        BOOT_JDK_FOUND=no
29315      else
29316        # Do we have a bin/javac?
29317        if test ! -x "$BOOT_JDK/bin/javac"; then
29318          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29319$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29320          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29321$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29322          BOOT_JDK_FOUND=no
29323        else
29324          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29325          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29326
29327          # Extra M4 quote needed to protect [] in grep expression.
29328          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29329          if test "x$FOUND_CORRECT_VERSION" = x; then
29330            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29331$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29332            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29333$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29334            BOOT_JDK_FOUND=no
29335          else
29336            # We're done! :-)
29337            BOOT_JDK_FOUND=yes
29338
29339  # Only process if variable expands to non-empty
29340
29341  if test "x$BOOT_JDK" != x; then
29342    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29343
29344  # Input might be given as Windows format, start by converting to
29345  # unix format.
29346  path="$BOOT_JDK"
29347  new_path=`$CYGPATH -u "$path"`
29348
29349  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29350  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29351  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29352  # "foo.exe" is OK but "foo" is an error.
29353  #
29354  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29355  # It is also a way to make sure we got the proper file name for the real test later on.
29356  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29357  if test "x$test_shortpath" = x; then
29358    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29359$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29360    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29361  fi
29362
29363  # Call helper function which possibly converts this using DOS-style short mode.
29364  # If so, the updated path is stored in $new_path.
29365
29366  input_path="$new_path"
29367  # Check if we need to convert this using DOS-style short mode. If the path
29368  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29369  # take no chances and rewrite it.
29370  # Note: m4 eats our [], so we need to use [ and ] instead.
29371  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29372  if test "x$has_forbidden_chars" != x; then
29373    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29374    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29375    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29376    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29377      # Going to short mode and back again did indeed matter. Since short mode is
29378      # case insensitive, let's make it lowercase to improve readability.
29379      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29380      # Now convert it back to Unix-style (cygpath)
29381      input_path=`$CYGPATH -u "$shortmode_path"`
29382      new_path="$input_path"
29383    fi
29384  fi
29385
29386  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29387  if test "x$test_cygdrive_prefix" = x; then
29388    # As a simple fix, exclude /usr/bin since it's not a real path.
29389    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29390      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29391      # a path prefixed by /cygdrive for fixpath to work.
29392      new_path="$CYGWIN_ROOT_PATH$input_path"
29393    fi
29394  fi
29395
29396
29397  if test "x$path" != "x$new_path"; then
29398    BOOT_JDK="$new_path"
29399    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29400$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29401  fi
29402
29403    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29404
29405  path="$BOOT_JDK"
29406  has_colon=`$ECHO $path | $GREP ^.:`
29407  new_path="$path"
29408  if test "x$has_colon" = x; then
29409    # Not in mixed or Windows style, start by that.
29410    new_path=`cmd //c echo $path`
29411  fi
29412
29413
29414  input_path="$new_path"
29415  # Check if we need to convert this using DOS-style short mode. If the path
29416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29417  # take no chances and rewrite it.
29418  # Note: m4 eats our [], so we need to use [ and ] instead.
29419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29420  if test "x$has_forbidden_chars" != x; then
29421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29422    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29423  fi
29424
29425
29426  windows_path="$new_path"
29427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29428    unix_path=`$CYGPATH -u "$windows_path"`
29429    new_path="$unix_path"
29430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29431    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29432    new_path="$unix_path"
29433  fi
29434
29435  if test "x$path" != "x$new_path"; then
29436    BOOT_JDK="$new_path"
29437    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29438$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29439  fi
29440
29441  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29442  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29443
29444    else
29445      # We're on a unix platform. Hooray! :)
29446      path="$BOOT_JDK"
29447      has_space=`$ECHO "$path" | $GREP " "`
29448      if test "x$has_space" != x; then
29449        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29450$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29451        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29452      fi
29453
29454      # Use eval to expand a potential ~
29455      eval path="$path"
29456      if test ! -f "$path" && test ! -d "$path"; then
29457        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29458      fi
29459
29460      if test -d "$path"; then
29461        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29462      else
29463        dir="`$DIRNAME "$path"`"
29464        base="`$BASENAME "$path"`"
29465        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29466      fi
29467    fi
29468  fi
29469
29470            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29471$as_echo_n "checking for Boot JDK... " >&6; }
29472            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29473$as_echo "$BOOT_JDK" >&6; }
29474            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29475$as_echo_n "checking Boot JDK version... " >&6; }
29476            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29477            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29478$as_echo "$BOOT_JDK_VERSION" >&6; }
29479          fi # end check jdk version
29480        fi # end check javac
29481      fi # end check java
29482    fi # end check boot jdk found
29483  fi
29484
29485    done
29486  fi
29487
29488
29489    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29490    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29491      # Do we have a bin/java?
29492      if test ! -x "$BOOT_JDK/bin/java"; then
29493        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29494$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29495        BOOT_JDK_FOUND=no
29496      else
29497        # Do we have a bin/javac?
29498        if test ! -x "$BOOT_JDK/bin/javac"; then
29499          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29500$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29501          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29502$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29503          BOOT_JDK_FOUND=no
29504        else
29505          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29506          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29507
29508          # Extra M4 quote needed to protect [] in grep expression.
29509          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29510          if test "x$FOUND_CORRECT_VERSION" = x; then
29511            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29512$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29513            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29514$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29515            BOOT_JDK_FOUND=no
29516          else
29517            # We're done! :-)
29518            BOOT_JDK_FOUND=yes
29519
29520  # Only process if variable expands to non-empty
29521
29522  if test "x$BOOT_JDK" != x; then
29523    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29524
29525  # Input might be given as Windows format, start by converting to
29526  # unix format.
29527  path="$BOOT_JDK"
29528  new_path=`$CYGPATH -u "$path"`
29529
29530  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29531  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29532  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29533  # "foo.exe" is OK but "foo" is an error.
29534  #
29535  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29536  # It is also a way to make sure we got the proper file name for the real test later on.
29537  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29538  if test "x$test_shortpath" = x; then
29539    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29540$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29541    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29542  fi
29543
29544  # Call helper function which possibly converts this using DOS-style short mode.
29545  # If so, the updated path is stored in $new_path.
29546
29547  input_path="$new_path"
29548  # Check if we need to convert this using DOS-style short mode. If the path
29549  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29550  # take no chances and rewrite it.
29551  # Note: m4 eats our [], so we need to use [ and ] instead.
29552  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29553  if test "x$has_forbidden_chars" != x; then
29554    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29555    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29556    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29557    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29558      # Going to short mode and back again did indeed matter. Since short mode is
29559      # case insensitive, let's make it lowercase to improve readability.
29560      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29561      # Now convert it back to Unix-style (cygpath)
29562      input_path=`$CYGPATH -u "$shortmode_path"`
29563      new_path="$input_path"
29564    fi
29565  fi
29566
29567  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29568  if test "x$test_cygdrive_prefix" = x; then
29569    # As a simple fix, exclude /usr/bin since it's not a real path.
29570    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29571      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29572      # a path prefixed by /cygdrive for fixpath to work.
29573      new_path="$CYGWIN_ROOT_PATH$input_path"
29574    fi
29575  fi
29576
29577
29578  if test "x$path" != "x$new_path"; then
29579    BOOT_JDK="$new_path"
29580    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29581$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29582  fi
29583
29584    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29585
29586  path="$BOOT_JDK"
29587  has_colon=`$ECHO $path | $GREP ^.:`
29588  new_path="$path"
29589  if test "x$has_colon" = x; then
29590    # Not in mixed or Windows style, start by that.
29591    new_path=`cmd //c echo $path`
29592  fi
29593
29594
29595  input_path="$new_path"
29596  # Check if we need to convert this using DOS-style short mode. If the path
29597  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29598  # take no chances and rewrite it.
29599  # Note: m4 eats our [], so we need to use [ and ] instead.
29600  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29601  if test "x$has_forbidden_chars" != x; then
29602    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29603    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29604  fi
29605
29606
29607  windows_path="$new_path"
29608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29609    unix_path=`$CYGPATH -u "$windows_path"`
29610    new_path="$unix_path"
29611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29612    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29613    new_path="$unix_path"
29614  fi
29615
29616  if test "x$path" != "x$new_path"; then
29617    BOOT_JDK="$new_path"
29618    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29619$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29620  fi
29621
29622  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29623  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29624
29625    else
29626      # We're on a unix platform. Hooray! :)
29627      path="$BOOT_JDK"
29628      has_space=`$ECHO "$path" | $GREP " "`
29629      if test "x$has_space" != x; then
29630        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29631$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29632        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29633      fi
29634
29635      # Use eval to expand a potential ~
29636      eval path="$path"
29637      if test ! -f "$path" && test ! -d "$path"; then
29638        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29639      fi
29640
29641      if test -d "$path"; then
29642        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29643      else
29644        dir="`$DIRNAME "$path"`"
29645        base="`$BASENAME "$path"`"
29646        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29647      fi
29648    fi
29649  fi
29650
29651            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29652$as_echo_n "checking for Boot JDK... " >&6; }
29653            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29654$as_echo "$BOOT_JDK" >&6; }
29655            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29656$as_echo_n "checking Boot JDK version... " >&6; }
29657            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29658            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29659$as_echo "$BOOT_JDK_VERSION" >&6; }
29660          fi # end check jdk version
29661        fi # end check javac
29662      fi # end check java
29663    fi # end check boot jdk found
29664  fi
29665
29666  fi
29667
29668
29669    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29670    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29671      # Do we have a bin/java?
29672      if test ! -x "$BOOT_JDK/bin/java"; then
29673        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29674$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29675        BOOT_JDK_FOUND=no
29676      else
29677        # Do we have a bin/javac?
29678        if test ! -x "$BOOT_JDK/bin/javac"; then
29679          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29680$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29681          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29682$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29683          BOOT_JDK_FOUND=no
29684        else
29685          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29686          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29687
29688          # Extra M4 quote needed to protect [] in grep expression.
29689          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29690          if test "x$FOUND_CORRECT_VERSION" = x; then
29691            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29692$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29693            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29694$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29695            BOOT_JDK_FOUND=no
29696          else
29697            # We're done! :-)
29698            BOOT_JDK_FOUND=yes
29699
29700  # Only process if variable expands to non-empty
29701
29702  if test "x$BOOT_JDK" != x; then
29703    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29704
29705  # Input might be given as Windows format, start by converting to
29706  # unix format.
29707  path="$BOOT_JDK"
29708  new_path=`$CYGPATH -u "$path"`
29709
29710  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29711  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29712  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29713  # "foo.exe" is OK but "foo" is an error.
29714  #
29715  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29716  # It is also a way to make sure we got the proper file name for the real test later on.
29717  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29718  if test "x$test_shortpath" = x; then
29719    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29720$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29721    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29722  fi
29723
29724  # Call helper function which possibly converts this using DOS-style short mode.
29725  # If so, the updated path is stored in $new_path.
29726
29727  input_path="$new_path"
29728  # Check if we need to convert this using DOS-style short mode. If the path
29729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29730  # take no chances and rewrite it.
29731  # Note: m4 eats our [], so we need to use [ and ] instead.
29732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29733  if test "x$has_forbidden_chars" != x; then
29734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29735    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29736    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29737    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29738      # Going to short mode and back again did indeed matter. Since short mode is
29739      # case insensitive, let's make it lowercase to improve readability.
29740      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29741      # Now convert it back to Unix-style (cygpath)
29742      input_path=`$CYGPATH -u "$shortmode_path"`
29743      new_path="$input_path"
29744    fi
29745  fi
29746
29747  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29748  if test "x$test_cygdrive_prefix" = x; then
29749    # As a simple fix, exclude /usr/bin since it's not a real path.
29750    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29751      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29752      # a path prefixed by /cygdrive for fixpath to work.
29753      new_path="$CYGWIN_ROOT_PATH$input_path"
29754    fi
29755  fi
29756
29757
29758  if test "x$path" != "x$new_path"; then
29759    BOOT_JDK="$new_path"
29760    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29761$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29762  fi
29763
29764    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29765
29766  path="$BOOT_JDK"
29767  has_colon=`$ECHO $path | $GREP ^.:`
29768  new_path="$path"
29769  if test "x$has_colon" = x; then
29770    # Not in mixed or Windows style, start by that.
29771    new_path=`cmd //c echo $path`
29772  fi
29773
29774
29775  input_path="$new_path"
29776  # Check if we need to convert this using DOS-style short mode. If the path
29777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29778  # take no chances and rewrite it.
29779  # Note: m4 eats our [], so we need to use [ and ] instead.
29780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29781  if test "x$has_forbidden_chars" != x; then
29782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29783    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29784  fi
29785
29786
29787  windows_path="$new_path"
29788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29789    unix_path=`$CYGPATH -u "$windows_path"`
29790    new_path="$unix_path"
29791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29793    new_path="$unix_path"
29794  fi
29795
29796  if test "x$path" != "x$new_path"; then
29797    BOOT_JDK="$new_path"
29798    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29799$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29800  fi
29801
29802  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29803  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29804
29805    else
29806      # We're on a unix platform. Hooray! :)
29807      path="$BOOT_JDK"
29808      has_space=`$ECHO "$path" | $GREP " "`
29809      if test "x$has_space" != x; then
29810        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29811$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29812        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29813      fi
29814
29815      # Use eval to expand a potential ~
29816      eval path="$path"
29817      if test ! -f "$path" && test ! -d "$path"; then
29818        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29819      fi
29820
29821      if test -d "$path"; then
29822        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29823      else
29824        dir="`$DIRNAME "$path"`"
29825        base="`$BASENAME "$path"`"
29826        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29827      fi
29828    fi
29829  fi
29830
29831            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29832$as_echo_n "checking for Boot JDK... " >&6; }
29833            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29834$as_echo "$BOOT_JDK" >&6; }
29835            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29836$as_echo_n "checking Boot JDK version... " >&6; }
29837            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29838            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29839$as_echo "$BOOT_JDK_VERSION" >&6; }
29840          fi # end check jdk version
29841        fi # end check javac
29842      fi # end check java
29843    fi # end check boot jdk found
29844  fi
29845
29846
29847  # If we haven't found anything yet, we've truly lost. Give up.
29848  if test "x$BOOT_JDK_FOUND" = xno; then
29849
29850  # Print a helpful message on how to acquire the necessary build dependency.
29851  # openjdk is the help tag: freetype, cups, alsa etc
29852  MISSING_DEPENDENCY=openjdk
29853
29854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29855    cygwin_help $MISSING_DEPENDENCY
29856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29857    msys_help $MISSING_DEPENDENCY
29858  else
29859    PKGHANDLER_COMMAND=
29860
29861    case $PKGHANDLER in
29862      apt-get)
29863        apt_help     $MISSING_DEPENDENCY ;;
29864      yum)
29865        yum_help     $MISSING_DEPENDENCY ;;
29866      port)
29867        port_help    $MISSING_DEPENDENCY ;;
29868      pkgutil)
29869        pkgutil_help $MISSING_DEPENDENCY ;;
29870      pkgadd)
29871        pkgadd_help  $MISSING_DEPENDENCY ;;
29872    esac
29873
29874    if test "x$PKGHANDLER_COMMAND" != x; then
29875      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29876    fi
29877  fi
29878
29879    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29880$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29881    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
29882$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29883    as_fn_error $? "Cannot continue" "$LINENO" 5
29884  fi
29885
29886
29887
29888  # Setup tools from the Boot JDK.
29889
29890  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29891
29892  # Publish this variable in the help.
29893
29894
29895  if [ -z "${JAVA+x}" ]; then
29896    # The variable is not set by user, try to locate tool using the code snippet
29897
29898      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29899$as_echo_n "checking for java in Boot JDK... " >&6; }
29900      JAVA=$BOOT_JDK/bin/java
29901      if test ! -x $JAVA; then
29902        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29903$as_echo "not found" >&6; }
29904        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29905$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29906        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29907      fi
29908      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29909$as_echo "ok" >&6; }
29910
29911
29912  else
29913    # The variable is set, but is it from the command line or the environment?
29914
29915    # Try to remove the string !JAVA! from our list.
29916    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29917    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29918      # If it failed, the variable was not from the command line. Ignore it,
29919      # but warn the user (except for BASH, which is always set by the calling BASH).
29920      if test "xJAVA" != xBASH; then
29921        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29922$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29923      fi
29924      # Try to locate tool using the code snippet
29925
29926      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29927$as_echo_n "checking for java in Boot JDK... " >&6; }
29928      JAVA=$BOOT_JDK/bin/java
29929      if test ! -x $JAVA; then
29930        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29931$as_echo "not found" >&6; }
29932        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29933$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29934        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29935      fi
29936      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29937$as_echo "ok" >&6; }
29938
29939
29940    else
29941      # If it succeeded, then it was overridden by the user. We will use it
29942      # for the tool.
29943
29944      # First remove it from the list of overridden variables, so we can test
29945      # for unknown variables in the end.
29946      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29947
29948      # Check if we try to supply an empty value
29949      if test "x$JAVA" = x; then
29950        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
29951$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
29952        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29953$as_echo_n "checking for JAVA... " >&6; }
29954        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29955$as_echo "disabled" >&6; }
29956      else
29957        # Check if the provided tool contains a complete path.
29958        tool_specified="$JAVA"
29959        tool_basename="${tool_specified##*/}"
29960        if test "x$tool_basename" = "x$tool_specified"; then
29961          # A command without a complete path is provided, search $PATH.
29962          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
29963$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
29964          # Extract the first word of "$tool_basename", so it can be a program name with args.
29965set dummy $tool_basename; ac_word=$2
29966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29967$as_echo_n "checking for $ac_word... " >&6; }
29968if ${ac_cv_path_JAVA+:} false; then :
29969  $as_echo_n "(cached) " >&6
29970else
29971  case $JAVA in
29972  [\\/]* | ?:[\\/]*)
29973  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
29974  ;;
29975  *)
29976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29977for as_dir in $PATH
29978do
29979  IFS=$as_save_IFS
29980  test -z "$as_dir" && as_dir=.
29981    for ac_exec_ext in '' $ac_executable_extensions; do
29982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29983    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
29984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29985    break 2
29986  fi
29987done
29988  done
29989IFS=$as_save_IFS
29990
29991  ;;
29992esac
29993fi
29994JAVA=$ac_cv_path_JAVA
29995if test -n "$JAVA"; then
29996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
29997$as_echo "$JAVA" >&6; }
29998else
29999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30000$as_echo "no" >&6; }
30001fi
30002
30003
30004          if test "x$JAVA" = x; then
30005            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30006          fi
30007        else
30008          # Otherwise we believe it is a complete path. Use it as it is.
30009          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30010$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30011          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30012$as_echo_n "checking for JAVA... " >&6; }
30013          if test ! -x "$tool_specified"; then
30014            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30015$as_echo "not found" >&6; }
30016            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30017          fi
30018          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30019$as_echo "$tool_specified" >&6; }
30020        fi
30021      fi
30022    fi
30023
30024  fi
30025
30026
30027
30028  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30029
30030  # Publish this variable in the help.
30031
30032
30033  if [ -z "${JAVAC+x}" ]; then
30034    # The variable is not set by user, try to locate tool using the code snippet
30035
30036      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30037$as_echo_n "checking for javac in Boot JDK... " >&6; }
30038      JAVAC=$BOOT_JDK/bin/javac
30039      if test ! -x $JAVAC; then
30040        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30041$as_echo "not found" >&6; }
30042        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30043$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30044        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30045      fi
30046      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30047$as_echo "ok" >&6; }
30048
30049
30050  else
30051    # The variable is set, but is it from the command line or the environment?
30052
30053    # Try to remove the string !JAVAC! from our list.
30054    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30055    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30056      # If it failed, the variable was not from the command line. Ignore it,
30057      # but warn the user (except for BASH, which is always set by the calling BASH).
30058      if test "xJAVAC" != xBASH; then
30059        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30060$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30061      fi
30062      # Try to locate tool using the code snippet
30063
30064      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30065$as_echo_n "checking for javac in Boot JDK... " >&6; }
30066      JAVAC=$BOOT_JDK/bin/javac
30067      if test ! -x $JAVAC; then
30068        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30069$as_echo "not found" >&6; }
30070        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30071$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30072        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30073      fi
30074      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30075$as_echo "ok" >&6; }
30076
30077
30078    else
30079      # If it succeeded, then it was overridden by the user. We will use it
30080      # for the tool.
30081
30082      # First remove it from the list of overridden variables, so we can test
30083      # for unknown variables in the end.
30084      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30085
30086      # Check if we try to supply an empty value
30087      if test "x$JAVAC" = x; then
30088        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30089$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30090        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30091$as_echo_n "checking for JAVAC... " >&6; }
30092        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30093$as_echo "disabled" >&6; }
30094      else
30095        # Check if the provided tool contains a complete path.
30096        tool_specified="$JAVAC"
30097        tool_basename="${tool_specified##*/}"
30098        if test "x$tool_basename" = "x$tool_specified"; then
30099          # A command without a complete path is provided, search $PATH.
30100          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30101$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30102          # Extract the first word of "$tool_basename", so it can be a program name with args.
30103set dummy $tool_basename; ac_word=$2
30104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30105$as_echo_n "checking for $ac_word... " >&6; }
30106if ${ac_cv_path_JAVAC+:} false; then :
30107  $as_echo_n "(cached) " >&6
30108else
30109  case $JAVAC in
30110  [\\/]* | ?:[\\/]*)
30111  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30112  ;;
30113  *)
30114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30115for as_dir in $PATH
30116do
30117  IFS=$as_save_IFS
30118  test -z "$as_dir" && as_dir=.
30119    for ac_exec_ext in '' $ac_executable_extensions; do
30120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30121    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30123    break 2
30124  fi
30125done
30126  done
30127IFS=$as_save_IFS
30128
30129  ;;
30130esac
30131fi
30132JAVAC=$ac_cv_path_JAVAC
30133if test -n "$JAVAC"; then
30134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30135$as_echo "$JAVAC" >&6; }
30136else
30137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30138$as_echo "no" >&6; }
30139fi
30140
30141
30142          if test "x$JAVAC" = x; then
30143            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30144          fi
30145        else
30146          # Otherwise we believe it is a complete path. Use it as it is.
30147          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30148$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30149          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30150$as_echo_n "checking for JAVAC... " >&6; }
30151          if test ! -x "$tool_specified"; then
30152            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30153$as_echo "not found" >&6; }
30154            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30155          fi
30156          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30157$as_echo "$tool_specified" >&6; }
30158        fi
30159      fi
30160    fi
30161
30162  fi
30163
30164
30165
30166  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30167
30168  # Publish this variable in the help.
30169
30170
30171  if [ -z "${JAVAH+x}" ]; then
30172    # The variable is not set by user, try to locate tool using the code snippet
30173
30174      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30175$as_echo_n "checking for javah in Boot JDK... " >&6; }
30176      JAVAH=$BOOT_JDK/bin/javah
30177      if test ! -x $JAVAH; then
30178        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30179$as_echo "not found" >&6; }
30180        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30181$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30182        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30183      fi
30184      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30185$as_echo "ok" >&6; }
30186
30187
30188  else
30189    # The variable is set, but is it from the command line or the environment?
30190
30191    # Try to remove the string !JAVAH! from our list.
30192    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30193    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30194      # If it failed, the variable was not from the command line. Ignore it,
30195      # but warn the user (except for BASH, which is always set by the calling BASH).
30196      if test "xJAVAH" != xBASH; then
30197        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30198$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30199      fi
30200      # Try to locate tool using the code snippet
30201
30202      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30203$as_echo_n "checking for javah in Boot JDK... " >&6; }
30204      JAVAH=$BOOT_JDK/bin/javah
30205      if test ! -x $JAVAH; then
30206        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30207$as_echo "not found" >&6; }
30208        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30209$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30210        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30211      fi
30212      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30213$as_echo "ok" >&6; }
30214
30215
30216    else
30217      # If it succeeded, then it was overridden by the user. We will use it
30218      # for the tool.
30219
30220      # First remove it from the list of overridden variables, so we can test
30221      # for unknown variables in the end.
30222      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30223
30224      # Check if we try to supply an empty value
30225      if test "x$JAVAH" = x; then
30226        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30227$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30228        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30229$as_echo_n "checking for JAVAH... " >&6; }
30230        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30231$as_echo "disabled" >&6; }
30232      else
30233        # Check if the provided tool contains a complete path.
30234        tool_specified="$JAVAH"
30235        tool_basename="${tool_specified##*/}"
30236        if test "x$tool_basename" = "x$tool_specified"; then
30237          # A command without a complete path is provided, search $PATH.
30238          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30239$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30240          # Extract the first word of "$tool_basename", so it can be a program name with args.
30241set dummy $tool_basename; ac_word=$2
30242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30243$as_echo_n "checking for $ac_word... " >&6; }
30244if ${ac_cv_path_JAVAH+:} false; then :
30245  $as_echo_n "(cached) " >&6
30246else
30247  case $JAVAH in
30248  [\\/]* | ?:[\\/]*)
30249  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30250  ;;
30251  *)
30252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30253for as_dir in $PATH
30254do
30255  IFS=$as_save_IFS
30256  test -z "$as_dir" && as_dir=.
30257    for ac_exec_ext in '' $ac_executable_extensions; do
30258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30259    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30261    break 2
30262  fi
30263done
30264  done
30265IFS=$as_save_IFS
30266
30267  ;;
30268esac
30269fi
30270JAVAH=$ac_cv_path_JAVAH
30271if test -n "$JAVAH"; then
30272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30273$as_echo "$JAVAH" >&6; }
30274else
30275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30276$as_echo "no" >&6; }
30277fi
30278
30279
30280          if test "x$JAVAH" = x; then
30281            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30282          fi
30283        else
30284          # Otherwise we believe it is a complete path. Use it as it is.
30285          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30286$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30287          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30288$as_echo_n "checking for JAVAH... " >&6; }
30289          if test ! -x "$tool_specified"; then
30290            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30291$as_echo "not found" >&6; }
30292            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30293          fi
30294          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30295$as_echo "$tool_specified" >&6; }
30296        fi
30297      fi
30298    fi
30299
30300  fi
30301
30302
30303
30304  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30305
30306  # Publish this variable in the help.
30307
30308
30309  if [ -z "${JAR+x}" ]; then
30310    # The variable is not set by user, try to locate tool using the code snippet
30311
30312      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30313$as_echo_n "checking for jar in Boot JDK... " >&6; }
30314      JAR=$BOOT_JDK/bin/jar
30315      if test ! -x $JAR; then
30316        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30317$as_echo "not found" >&6; }
30318        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30319$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30320        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30321      fi
30322      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30323$as_echo "ok" >&6; }
30324
30325
30326  else
30327    # The variable is set, but is it from the command line or the environment?
30328
30329    # Try to remove the string !JAR! from our list.
30330    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30331    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30332      # If it failed, the variable was not from the command line. Ignore it,
30333      # but warn the user (except for BASH, which is always set by the calling BASH).
30334      if test "xJAR" != xBASH; then
30335        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30336$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30337      fi
30338      # Try to locate tool using the code snippet
30339
30340      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30341$as_echo_n "checking for jar in Boot JDK... " >&6; }
30342      JAR=$BOOT_JDK/bin/jar
30343      if test ! -x $JAR; then
30344        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30345$as_echo "not found" >&6; }
30346        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30347$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30348        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30349      fi
30350      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30351$as_echo "ok" >&6; }
30352
30353
30354    else
30355      # If it succeeded, then it was overridden by the user. We will use it
30356      # for the tool.
30357
30358      # First remove it from the list of overridden variables, so we can test
30359      # for unknown variables in the end.
30360      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30361
30362      # Check if we try to supply an empty value
30363      if test "x$JAR" = x; then
30364        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30365$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30366        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30367$as_echo_n "checking for JAR... " >&6; }
30368        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30369$as_echo "disabled" >&6; }
30370      else
30371        # Check if the provided tool contains a complete path.
30372        tool_specified="$JAR"
30373        tool_basename="${tool_specified##*/}"
30374        if test "x$tool_basename" = "x$tool_specified"; then
30375          # A command without a complete path is provided, search $PATH.
30376          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30377$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30378          # Extract the first word of "$tool_basename", so it can be a program name with args.
30379set dummy $tool_basename; ac_word=$2
30380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30381$as_echo_n "checking for $ac_word... " >&6; }
30382if ${ac_cv_path_JAR+:} false; then :
30383  $as_echo_n "(cached) " >&6
30384else
30385  case $JAR in
30386  [\\/]* | ?:[\\/]*)
30387  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30388  ;;
30389  *)
30390  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30391for as_dir in $PATH
30392do
30393  IFS=$as_save_IFS
30394  test -z "$as_dir" && as_dir=.
30395    for ac_exec_ext in '' $ac_executable_extensions; do
30396  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30397    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30398    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30399    break 2
30400  fi
30401done
30402  done
30403IFS=$as_save_IFS
30404
30405  ;;
30406esac
30407fi
30408JAR=$ac_cv_path_JAR
30409if test -n "$JAR"; then
30410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30411$as_echo "$JAR" >&6; }
30412else
30413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30414$as_echo "no" >&6; }
30415fi
30416
30417
30418          if test "x$JAR" = x; then
30419            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30420          fi
30421        else
30422          # Otherwise we believe it is a complete path. Use it as it is.
30423          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30424$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30425          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30426$as_echo_n "checking for JAR... " >&6; }
30427          if test ! -x "$tool_specified"; then
30428            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30429$as_echo "not found" >&6; }
30430            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30431          fi
30432          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30433$as_echo "$tool_specified" >&6; }
30434        fi
30435      fi
30436    fi
30437
30438  fi
30439
30440
30441
30442  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30443
30444  # Publish this variable in the help.
30445
30446
30447  if [ -z "${JARSIGNER+x}" ]; then
30448    # The variable is not set by user, try to locate tool using the code snippet
30449
30450      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30451$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30452      JARSIGNER=$BOOT_JDK/bin/jarsigner
30453      if test ! -x $JARSIGNER; then
30454        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30455$as_echo "not found" >&6; }
30456        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30457$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30458        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30459      fi
30460      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30461$as_echo "ok" >&6; }
30462
30463
30464  else
30465    # The variable is set, but is it from the command line or the environment?
30466
30467    # Try to remove the string !JARSIGNER! from our list.
30468    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30469    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30470      # If it failed, the variable was not from the command line. Ignore it,
30471      # but warn the user (except for BASH, which is always set by the calling BASH).
30472      if test "xJARSIGNER" != xBASH; then
30473        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30474$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30475      fi
30476      # Try to locate tool using the code snippet
30477
30478      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30479$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30480      JARSIGNER=$BOOT_JDK/bin/jarsigner
30481      if test ! -x $JARSIGNER; then
30482        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30483$as_echo "not found" >&6; }
30484        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30485$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30486        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30487      fi
30488      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30489$as_echo "ok" >&6; }
30490
30491
30492    else
30493      # If it succeeded, then it was overridden by the user. We will use it
30494      # for the tool.
30495
30496      # First remove it from the list of overridden variables, so we can test
30497      # for unknown variables in the end.
30498      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30499
30500      # Check if we try to supply an empty value
30501      if test "x$JARSIGNER" = x; then
30502        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30503$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30504        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30505$as_echo_n "checking for JARSIGNER... " >&6; }
30506        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30507$as_echo "disabled" >&6; }
30508      else
30509        # Check if the provided tool contains a complete path.
30510        tool_specified="$JARSIGNER"
30511        tool_basename="${tool_specified##*/}"
30512        if test "x$tool_basename" = "x$tool_specified"; then
30513          # A command without a complete path is provided, search $PATH.
30514          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30515$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30516          # Extract the first word of "$tool_basename", so it can be a program name with args.
30517set dummy $tool_basename; ac_word=$2
30518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30519$as_echo_n "checking for $ac_word... " >&6; }
30520if ${ac_cv_path_JARSIGNER+:} false; then :
30521  $as_echo_n "(cached) " >&6
30522else
30523  case $JARSIGNER in
30524  [\\/]* | ?:[\\/]*)
30525  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30526  ;;
30527  *)
30528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30529for as_dir in $PATH
30530do
30531  IFS=$as_save_IFS
30532  test -z "$as_dir" && as_dir=.
30533    for ac_exec_ext in '' $ac_executable_extensions; do
30534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30535    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30537    break 2
30538  fi
30539done
30540  done
30541IFS=$as_save_IFS
30542
30543  ;;
30544esac
30545fi
30546JARSIGNER=$ac_cv_path_JARSIGNER
30547if test -n "$JARSIGNER"; then
30548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30549$as_echo "$JARSIGNER" >&6; }
30550else
30551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30552$as_echo "no" >&6; }
30553fi
30554
30555
30556          if test "x$JARSIGNER" = x; then
30557            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30558          fi
30559        else
30560          # Otherwise we believe it is a complete path. Use it as it is.
30561          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30562$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30563          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30564$as_echo_n "checking for JARSIGNER... " >&6; }
30565          if test ! -x "$tool_specified"; then
30566            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30567$as_echo "not found" >&6; }
30568            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30569          fi
30570          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30571$as_echo "$tool_specified" >&6; }
30572        fi
30573      fi
30574    fi
30575
30576  fi
30577
30578
30579
30580  # Finally, set some other options...
30581
30582  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30583  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30584
30585
30586
30587  $ECHO "Check if jvm arg is ok: --patch-module foo=bar" >&5
30588  $ECHO "Command: $JAVA --patch-module foo=bar -version" >&5
30589  OUTPUT=`$JAVA --patch-module foo=bar -version 2>&1`
30590  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
30591  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
30592  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30593    dummy="$dummy --patch-module foo=bar"
30594    JVM_ARG_OK=true
30595  else
30596    $ECHO "Arg failed:" >&5
30597    $ECHO "$OUTPUT" >&5
30598    JVM_ARG_OK=false
30599  fi
30600
30601  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30602$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30603  if test "x$JVM_ARG_OK" = "xtrue"; then
30604    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30605$as_echo "yes" >&6; }
30606    BOOT_JDK_MODULAR="true"
30607  else
30608    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30609$as_echo "no" >&6; }
30610    BOOT_JDK_MODULAR="false"
30611  fi
30612
30613
30614
30615
30616  # Check if the boot jdk is 32 or 64 bit
30617  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30618    BOOT_JDK_BITS="64"
30619  else
30620    BOOT_JDK_BITS="32"
30621  fi
30622  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30623$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30625$as_echo "$BOOT_JDK_BITS" >&6; }
30626
30627
30628
30629
30630# Check whether --with-build-jdk was given.
30631if test "${with_build_jdk+set}" = set; then :
30632  withval=$with_build_jdk;
30633fi
30634
30635
30636  CREATE_BUILDJDK=false
30637  EXTERNAL_BUILDJDK=false
30638  BUILD_JDK_FOUND="no"
30639  if test "x$with_build_jdk" != "x"; then
30640
30641  if test "x$BUILD_JDK_FOUND" = xno; then
30642    # Execute the test
30643
30644       if test "x$with_build_jdk" != x; then
30645         BUILD_JDK=$with_build_jdk
30646         BUILD_JDK_FOUND=maybe
30647         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30648$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30649       fi
30650
30651    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30652    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30653      # Do we have a bin/java?
30654      if test ! -x "$BUILD_JDK/bin/java"; then
30655        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30656$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30657        BUILD_JDK_FOUND=no
30658      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30659        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30660$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30661        BUILD_JDK_FOUND=no
30662      elif test ! -x "$BUILD_JDK/bin/jmod"; then
30663        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30664$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30665        BUILD_JDK_FOUND=no
30666      elif test ! -x "$BUILD_JDK/bin/javac"; then
30667        # Do we have a bin/javac?
30668        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30669$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30670        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30671$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30672        BUILD_JDK_FOUND=no
30673      else
30674        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30675        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30676
30677        # Extra M4 quote needed to protect [] in grep expression.
30678        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30679        if test "x$FOUND_CORRECT_VERSION" = x; then
30680          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30681$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30682          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30683$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30684          BUILD_JDK_FOUND=no
30685        else
30686          # We're done!
30687          BUILD_JDK_FOUND=yes
30688
30689  # Only process if variable expands to non-empty
30690
30691  if test "x$BUILD_JDK" != x; then
30692    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30693
30694  # Input might be given as Windows format, start by converting to
30695  # unix format.
30696  path="$BUILD_JDK"
30697  new_path=`$CYGPATH -u "$path"`
30698
30699  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30700  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30701  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30702  # "foo.exe" is OK but "foo" is an error.
30703  #
30704  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30705  # It is also a way to make sure we got the proper file name for the real test later on.
30706  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30707  if test "x$test_shortpath" = x; then
30708    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30709$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30710    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30711  fi
30712
30713  # Call helper function which possibly converts this using DOS-style short mode.
30714  # If so, the updated path is stored in $new_path.
30715
30716  input_path="$new_path"
30717  # Check if we need to convert this using DOS-style short mode. If the path
30718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30719  # take no chances and rewrite it.
30720  # Note: m4 eats our [], so we need to use [ and ] instead.
30721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30722  if test "x$has_forbidden_chars" != x; then
30723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30724    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30725    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30726    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30727      # Going to short mode and back again did indeed matter. Since short mode is
30728      # case insensitive, let's make it lowercase to improve readability.
30729      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30730      # Now convert it back to Unix-style (cygpath)
30731      input_path=`$CYGPATH -u "$shortmode_path"`
30732      new_path="$input_path"
30733    fi
30734  fi
30735
30736  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30737  if test "x$test_cygdrive_prefix" = x; then
30738    # As a simple fix, exclude /usr/bin since it's not a real path.
30739    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30740      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30741      # a path prefixed by /cygdrive for fixpath to work.
30742      new_path="$CYGWIN_ROOT_PATH$input_path"
30743    fi
30744  fi
30745
30746
30747  if test "x$path" != "x$new_path"; then
30748    BUILD_JDK="$new_path"
30749    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30750$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30751  fi
30752
30753    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30754
30755  path="$BUILD_JDK"
30756  has_colon=`$ECHO $path | $GREP ^.:`
30757  new_path="$path"
30758  if test "x$has_colon" = x; then
30759    # Not in mixed or Windows style, start by that.
30760    new_path=`cmd //c echo $path`
30761  fi
30762
30763
30764  input_path="$new_path"
30765  # Check if we need to convert this using DOS-style short mode. If the path
30766  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30767  # take no chances and rewrite it.
30768  # Note: m4 eats our [], so we need to use [ and ] instead.
30769  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30770  if test "x$has_forbidden_chars" != x; then
30771    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30772    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30773  fi
30774
30775
30776  windows_path="$new_path"
30777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30778    unix_path=`$CYGPATH -u "$windows_path"`
30779    new_path="$unix_path"
30780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30781    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30782    new_path="$unix_path"
30783  fi
30784
30785  if test "x$path" != "x$new_path"; then
30786    BUILD_JDK="$new_path"
30787    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30788$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30789  fi
30790
30791  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30792  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30793
30794    else
30795      # We're on a unix platform. Hooray! :)
30796      path="$BUILD_JDK"
30797      has_space=`$ECHO "$path" | $GREP " "`
30798      if test "x$has_space" != x; then
30799        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30800$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30801        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30802      fi
30803
30804      # Use eval to expand a potential ~
30805      eval path="$path"
30806      if test ! -f "$path" && test ! -d "$path"; then
30807        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30808      fi
30809
30810      if test -d "$path"; then
30811        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30812      else
30813        dir="`$DIRNAME "$path"`"
30814        base="`$BASENAME "$path"`"
30815        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30816      fi
30817    fi
30818  fi
30819
30820          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30821$as_echo_n "checking for Build JDK... " >&6; }
30822          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30823$as_echo "$BUILD_JDK" >&6; }
30824          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30825$as_echo_n "checking Build JDK version... " >&6; }
30826          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30827          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30828$as_echo "$BUILD_JDK_VERSION" >&6; }
30829        fi # end check jdk version
30830      fi # end check java
30831    fi # end check build jdk found
30832  fi
30833
30834    EXTERNAL_BUILDJDK=true
30835  else
30836    if test "x$COMPILE_TYPE" = "xcross"; then
30837      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30838      BUILD_JDK_FOUND=yes
30839      CREATE_BUILDJDK=true
30840      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30841$as_echo_n "checking for Build JDK... " >&6; }
30842      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30843$as_echo "yes, will build it for the host platform" >&6; }
30844    else
30845      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30846      BUILD_JDK_FOUND=yes
30847      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30848$as_echo_n "checking for Build JDK... " >&6; }
30849      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30850$as_echo "yes, will use output dir" >&6; }
30851    fi
30852  fi
30853
30854  JMOD="$BUILD_JDK/bin/jmod"
30855  JLINK="$BUILD_JDK/bin/jlink"
30856
30857
30858
30859  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30860    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30861$as_echo_n "checking for Build JDK... " >&6; }
30862    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30863$as_echo "no" >&6; }
30864    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30865  fi
30866
30867
30868
30869
30870
30871
30872###############################################################################
30873#
30874# Configure the sources to use. We can add or override individual directories.
30875#
30876###############################################################################
30877
30878
30879  # Where are the sources.
30880  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30881  CORBA_TOPDIR="$SRC_ROOT/corba"
30882  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30883  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30884  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30885  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30886  JDK_TOPDIR="$SRC_ROOT/jdk"
30887
30888
30889
30890
30891
30892
30893
30894
30895
30896  # This feature is no longer supported.
30897
30898
30899
30900# Check whether --with-add-source-root was given.
30901if test "${with_add_source_root+set}" = set; then :
30902  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
30903$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30904fi
30905
30906
30907
30908
30909# Check whether --with-override-source-root was given.
30910if test "${with_override_source_root+set}" = set; then :
30911  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
30912$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30913fi
30914
30915
30916
30917
30918# Check whether --with-adds-and-overrides was given.
30919if test "${with_adds_and_overrides+set}" = set; then :
30920  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
30921$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30922fi
30923
30924
30925
30926
30927# Check whether --with-override-langtools was given.
30928if test "${with_override_langtools+set}" = set; then :
30929  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30930$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30931fi
30932
30933
30934
30935
30936# Check whether --with-override-corba was given.
30937if test "${with_override_corba+set}" = set; then :
30938  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30939$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
30940fi
30941
30942
30943
30944
30945# Check whether --with-override-jaxp was given.
30946if test "${with_override_jaxp+set}" = set; then :
30947  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
30948$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
30949fi
30950
30951
30952
30953
30954# Check whether --with-override-jaxws was given.
30955if test "${with_override_jaxws+set}" = set; then :
30956  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
30957$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
30958fi
30959
30960
30961
30962
30963# Check whether --with-override-hotspot was given.
30964if test "${with_override_hotspot+set}" = set; then :
30965  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
30966$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
30967fi
30968
30969
30970
30971
30972# Check whether --with-override-nashorn was given.
30973if test "${with_override_nashorn+set}" = set; then :
30974  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
30975$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
30976fi
30977
30978
30979
30980
30981# Check whether --with-override-jdk was given.
30982if test "${with_override_jdk+set}" = set; then :
30983  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
30984$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
30985fi
30986
30987
30988
30989
30990  BUILD_OUTPUT="$OUTPUT_ROOT"
30991
30992
30993  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
30994  BUILD_HOTSPOT=true
30995
30996
30997
30998# Check whether --with-import-hotspot was given.
30999if test "${with_import_hotspot+set}" = set; then :
31000  withval=$with_import_hotspot;
31001fi
31002
31003  if test "x$with_import_hotspot" != x; then
31004    CURDIR="$PWD"
31005    cd "$with_import_hotspot"
31006    HOTSPOT_DIST="`pwd`"
31007    cd "$CURDIR"
31008    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
31009      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
31010    fi
31011    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
31012$as_echo_n "checking if hotspot should be imported... " >&6; }
31013    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
31014$as_echo "yes from $HOTSPOT_DIST" >&6; }
31015    BUILD_HOTSPOT=false
31016  fi
31017
31018  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31019
31020
31021
31022
31023# Check whether --with-import-modules was given.
31024if test "${with_import_modules+set}" = set; then :
31025  withval=$with_import_modules;
31026fi
31027
31028
31029  if test "x$with_import_modules" != x \
31030      && test "x$with_import_modules" != "xno"; then
31031    if test -d "$with_import_modules"; then
31032      IMPORT_MODULES_TOPDIR="$with_import_modules"
31033
31034  # Only process if variable expands to non-empty
31035
31036  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31037    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31038
31039  # Input might be given as Windows format, start by converting to
31040  # unix format.
31041  path="$IMPORT_MODULES_TOPDIR"
31042  new_path=`$CYGPATH -u "$path"`
31043
31044  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31045  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31046  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31047  # "foo.exe" is OK but "foo" is an error.
31048  #
31049  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31050  # It is also a way to make sure we got the proper file name for the real test later on.
31051  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31052  if test "x$test_shortpath" = x; then
31053    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31054$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31055    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31056  fi
31057
31058  # Call helper function which possibly converts this using DOS-style short mode.
31059  # If so, the updated path is stored in $new_path.
31060
31061  input_path="$new_path"
31062  # Check if we need to convert this using DOS-style short mode. If the path
31063  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31064  # take no chances and rewrite it.
31065  # Note: m4 eats our [], so we need to use [ and ] instead.
31066  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31067  if test "x$has_forbidden_chars" != x; then
31068    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31069    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31070    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31071    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31072      # Going to short mode and back again did indeed matter. Since short mode is
31073      # case insensitive, let's make it lowercase to improve readability.
31074      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31075      # Now convert it back to Unix-style (cygpath)
31076      input_path=`$CYGPATH -u "$shortmode_path"`
31077      new_path="$input_path"
31078    fi
31079  fi
31080
31081  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31082  if test "x$test_cygdrive_prefix" = x; then
31083    # As a simple fix, exclude /usr/bin since it's not a real path.
31084    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31085      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31086      # a path prefixed by /cygdrive for fixpath to work.
31087      new_path="$CYGWIN_ROOT_PATH$input_path"
31088    fi
31089  fi
31090
31091
31092  if test "x$path" != "x$new_path"; then
31093    IMPORT_MODULES_TOPDIR="$new_path"
31094    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31095$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31096  fi
31097
31098    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31099
31100  path="$IMPORT_MODULES_TOPDIR"
31101  has_colon=`$ECHO $path | $GREP ^.:`
31102  new_path="$path"
31103  if test "x$has_colon" = x; then
31104    # Not in mixed or Windows style, start by that.
31105    new_path=`cmd //c echo $path`
31106  fi
31107
31108
31109  input_path="$new_path"
31110  # Check if we need to convert this using DOS-style short mode. If the path
31111  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31112  # take no chances and rewrite it.
31113  # Note: m4 eats our [], so we need to use [ and ] instead.
31114  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31115  if test "x$has_forbidden_chars" != x; then
31116    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31117    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31118  fi
31119
31120
31121  windows_path="$new_path"
31122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31123    unix_path=`$CYGPATH -u "$windows_path"`
31124    new_path="$unix_path"
31125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31126    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31127    new_path="$unix_path"
31128  fi
31129
31130  if test "x$path" != "x$new_path"; then
31131    IMPORT_MODULES_TOPDIR="$new_path"
31132    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31133$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31134  fi
31135
31136  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31137  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31138
31139    else
31140      # We're on a unix platform. Hooray! :)
31141      path="$IMPORT_MODULES_TOPDIR"
31142      has_space=`$ECHO "$path" | $GREP " "`
31143      if test "x$has_space" != x; then
31144        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31145$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31146        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31147      fi
31148
31149      # Use eval to expand a potential ~
31150      eval path="$path"
31151      if test ! -f "$path" && test ! -d "$path"; then
31152        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31153      fi
31154
31155      if test -d "$path"; then
31156        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31157      else
31158        dir="`$DIRNAME "$path"`"
31159        base="`$BASENAME "$path"`"
31160        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31161      fi
31162    fi
31163  fi
31164
31165    elif test -e "$with_import_modules"; then
31166      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31167      $RM -rf "$IMPORT_MODULES_TOPDIR"
31168      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31169      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31170        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31171      fi
31172    else
31173      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31174    fi
31175  fi
31176
31177  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31178    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31179  fi
31180  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31181    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31182  fi
31183  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31184    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31185  fi
31186  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31187    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31188  fi
31189  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31190    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31191  fi
31192  # Workaround for using different imported module-info.java in Jake due to a
31193  # change in format. Remove once new format is standard in JDK 9 and javafx
31194  # delivers just that.
31195  if test -d "$IMPORT_MODULES_TOPDIR/modules_src_jake"; then
31196    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src_jake $IMPORT_MODULES_SRC"
31197  fi
31198  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31199    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31200  fi
31201
31202
31203
31204
31205
31206
31207
31208
31209
31210###############################################################################
31211#
31212# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31213# native code.
31214#
31215###############################################################################
31216
31217# See if we are doing a complete static build or not
31218
31219  # Check whether --enable-static-build was given.
31220if test "${enable_static_build+set}" = set; then :
31221  enableval=$enable_static_build;
31222fi
31223
31224  STATIC_BUILD=false
31225  if test "x$enable_static_build" = "xyes"; then
31226    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31227$as_echo_n "checking if static build is enabled... " >&6; }
31228    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31229$as_echo "yes" >&6; }
31230    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31231      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31232    fi
31233    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31234    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
31235    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
31236    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31237    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31238    STATIC_BUILD=true
31239  elif test "x$enable_static_build" = "xno"; then
31240    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31241$as_echo_n "checking if static build is enabled... " >&6; }
31242    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31243$as_echo "no" >&6; }
31244  elif test "x$enable_static_build" != "x"; then
31245    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31246  fi
31247
31248
31249
31250
31251# First determine the toolchain type (compiler family)
31252
31253
31254# Check whether --with-toolchain-type was given.
31255if test "${with_toolchain_type+set}" = set; then :
31256  withval=$with_toolchain_type;
31257fi
31258
31259
31260  # Use indirect variable referencing
31261  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31262  VALID_TOOLCHAINS=${!toolchain_var_name}
31263
31264  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31265    if test -n "$XCODEBUILD"; then
31266      # On Mac OS X, default toolchain to clang after Xcode 5
31267      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31268      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31269      if test $? -ne 0; then
31270        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31271      fi
31272      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31273          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31274          $CUT -f 1 -d .`
31275      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31276$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31277      if test $XCODE_MAJOR_VERSION -ge 5; then
31278          DEFAULT_TOOLCHAIN="clang"
31279      else
31280          DEFAULT_TOOLCHAIN="gcc"
31281      fi
31282    else
31283      # If Xcode is not installed, but the command line tools are
31284      # then we can't run xcodebuild. On these systems we should
31285      # default to clang
31286      DEFAULT_TOOLCHAIN="clang"
31287    fi
31288  else
31289    # First toolchain type in the list is the default
31290    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31291  fi
31292
31293  if test "x$with_toolchain_type" = xlist; then
31294    # List all toolchains
31295    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31296$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31297    for toolchain in $VALID_TOOLCHAINS; do
31298      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31299      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31300      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31301    done
31302
31303    exit 0
31304  elif test "x$with_toolchain_type" != x; then
31305    # User override; check that it is valid
31306    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31307      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31308$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31309      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31310$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31311      as_fn_error $? "Cannot continue." "$LINENO" 5
31312    fi
31313    TOOLCHAIN_TYPE=$with_toolchain_type
31314  else
31315    # No flag given, use default
31316    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31317  fi
31318
31319
31320  TOOLCHAIN_CC_BINARY_clang="clang"
31321  TOOLCHAIN_CC_BINARY_gcc="gcc"
31322  TOOLCHAIN_CC_BINARY_microsoft="cl"
31323  TOOLCHAIN_CC_BINARY_solstudio="cc"
31324  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31325
31326  TOOLCHAIN_CXX_BINARY_clang="clang++"
31327  TOOLCHAIN_CXX_BINARY_gcc="g++"
31328  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31329  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31330  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31331
31332  # Use indirect variable referencing
31333  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31334  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31335  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31336  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31337  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31338  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31339  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31340  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31341
31342
31343  # Define filename patterns
31344  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31345    LIBRARY_PREFIX=
31346    SHARED_LIBRARY_SUFFIX='.dll'
31347    STATIC_LIBRARY_SUFFIX='.lib'
31348    SHARED_LIBRARY='$1.dll'
31349    STATIC_LIBRARY='$1.lib'
31350    OBJ_SUFFIX='.obj'
31351    EXE_SUFFIX='.exe'
31352  else
31353    LIBRARY_PREFIX=lib
31354    SHARED_LIBRARY_SUFFIX='.so'
31355    STATIC_LIBRARY_SUFFIX='.a'
31356    SHARED_LIBRARY='lib$1.so'
31357    STATIC_LIBRARY='lib$1.a'
31358    OBJ_SUFFIX='.o'
31359    EXE_SUFFIX=''
31360    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31361      # For full static builds, we're overloading the SHARED_LIBRARY
31362      # variables in order to limit the amount of changes required.
31363      # It would be better to remove SHARED and just use LIBRARY and
31364      # LIBRARY_SUFFIX for libraries that can be built either
31365      # shared or static and use STATIC_* for libraries that are
31366      # always built statically.
31367      if test "x$STATIC_BUILD" = xtrue; then
31368        SHARED_LIBRARY='lib$1.a'
31369        SHARED_LIBRARY_SUFFIX='.a'
31370      else
31371        SHARED_LIBRARY='lib$1.dylib'
31372        SHARED_LIBRARY_SUFFIX='.dylib'
31373      fi
31374    fi
31375  fi
31376
31377
31378
31379
31380
31381
31382
31383
31384
31385
31386  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31387    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31388$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31389  else
31390    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31391$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31392  fi
31393
31394
31395# User supplied flags should be used when configure detects compilers
31396
31397  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31398    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31399$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31400  fi
31401
31402  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31403    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31404$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31405  fi
31406
31407  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31408    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31409$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31410  fi
31411
31412
31413# Check whether --with-extra-cflags was given.
31414if test "${with_extra_cflags+set}" = set; then :
31415  withval=$with_extra_cflags;
31416fi
31417
31418
31419
31420# Check whether --with-extra-cxxflags was given.
31421if test "${with_extra_cxxflags+set}" = set; then :
31422  withval=$with_extra_cxxflags;
31423fi
31424
31425
31426
31427# Check whether --with-extra-ldflags was given.
31428if test "${with_extra_ldflags+set}" = set; then :
31429  withval=$with_extra_ldflags;
31430fi
31431
31432
31433  EXTRA_CFLAGS="$with_extra_cflags"
31434  EXTRA_CXXFLAGS="$with_extra_cxxflags"
31435  EXTRA_LDFLAGS="$with_extra_ldflags"
31436
31437  # Hotspot needs these set in their legacy form
31438  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
31439  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
31440  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
31441
31442
31443
31444
31445
31446
31447
31448
31449
31450  # The global CFLAGS and LDLAGS variables are used by configure tests and
31451  # should include the extra parameters
31452  CFLAGS="$EXTRA_CFLAGS"
31453  CXXFLAGS="$EXTRA_CXXFLAGS"
31454  LDFLAGS="$EXTRA_LDFLAGS"
31455  CPPFLAGS=""
31456
31457# The sysroot cflags are needed for configure to be able to run the compilers
31458
31459  if test "x$SYSROOT" != "x"; then
31460    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31461      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31462        # Solaris Studio does not have a concept of sysroot. Instead we must
31463        # make sure the default include and lib dirs are appended to each
31464        # compile and link command line. Must also add -I-xbuiltin to enable
31465        # inlining of system functions and intrinsics.
31466        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31467        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31468            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
31469      fi
31470    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31471      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31472      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31473    elif test "x$TOOLCHAIN_TYPE" = xclang; then
31474      SYSROOT_CFLAGS="-isysroot $SYSROOT"
31475      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31476    fi
31477    # Propagate the sysroot args to hotspot
31478    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
31479    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
31480    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
31481    # The global CFLAGS and LDFLAGS variables need these for configure to function
31482    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31483    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31484    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31485    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31486  fi
31487
31488  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31489    # We also need -iframework<path>/System/Library/Frameworks
31490    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31491    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31492    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31493    # set this here so it doesn't have to be peppered throughout the forest
31494    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31495    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31496  fi
31497
31498
31499
31500
31501
31502# Then detect the actual binaries needed
31503
31504  # FIXME: Is this needed?
31505  ac_ext=cpp
31506ac_cpp='$CXXCPP $CPPFLAGS'
31507ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31508ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31509ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31510
31511
31512  # Store the CFLAGS etc passed to the configure script.
31513  ORG_CFLAGS="$CFLAGS"
31514  ORG_CXXFLAGS="$CXXFLAGS"
31515
31516  # autoconf magic only relies on PATH, so update it if tools dir is specified
31517  OLD_PATH="$PATH"
31518
31519  # On Windows, we need to detect the visual studio installation first.
31520  # This will change the PATH, but we need to keep that new PATH even
31521  # after toolchain detection is done, since the compiler (on x86) uses
31522  # it for DLL resolution in runtime.
31523  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31524      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31525
31526  # Store path to cygwin link.exe to help excluding it when searching for
31527  # VS linker. This must be done before changing the PATH when looking for VS.
31528  # Extract the first word of "link", so it can be a program name with args.
31529set dummy link; ac_word=$2
31530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31531$as_echo_n "checking for $ac_word... " >&6; }
31532if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31533  $as_echo_n "(cached) " >&6
31534else
31535  case $CYGWIN_LINK in
31536  [\\/]* | ?:[\\/]*)
31537  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31538  ;;
31539  *)
31540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31541for as_dir in $PATH
31542do
31543  IFS=$as_save_IFS
31544  test -z "$as_dir" && as_dir=.
31545    for ac_exec_ext in '' $ac_executable_extensions; do
31546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31547    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31549    break 2
31550  fi
31551done
31552  done
31553IFS=$as_save_IFS
31554
31555  ;;
31556esac
31557fi
31558CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31559if test -n "$CYGWIN_LINK"; then
31560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31561$as_echo "$CYGWIN_LINK" >&6; }
31562else
31563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31564$as_echo "no" >&6; }
31565fi
31566
31567
31568  if test "x$CYGWIN_LINK" != x; then
31569    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31570$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31571    "$CYGWIN_LINK" --version > /dev/null
31572    if test $? -eq 0 ; then
31573      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31574$as_echo "yes" >&6; }
31575    else
31576      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31577$as_echo "no" >&6; }
31578      # This might be the VS linker. Don't exclude it later on.
31579      CYGWIN_LINK=""
31580    fi
31581  fi
31582
31583  # First-hand choice is to locate and run the vsvars bat file.
31584
31585
31586# Check whether --with-toolchain-version was given.
31587if test "${with_toolchain_version+set}" = set; then :
31588  withval=$with_toolchain_version;
31589fi
31590
31591
31592  if test "x$with_toolchain_version" = xlist; then
31593    # List all toolchains
31594    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31595$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31596    for version in $VALID_VS_VERSIONS; do
31597      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31598      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31599    done
31600
31601    exit 0
31602  elif test "x$DEVKIT_VS_VERSION" != x; then
31603    VS_VERSION=$DEVKIT_VS_VERSION
31604    TOOLCHAIN_VERSION=$VS_VERSION
31605    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31606    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31607    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31608    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31609    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31610    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31611
31612    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31613    # can still be exported as INCLUDE for compiler invocations without
31614    # SYSROOT_CFLAGS
31615    OLDIFS="$IFS"
31616    IFS=";"
31617    for i in $DEVKIT_VS_INCLUDE; do
31618      ipath=$i
31619
31620  unix_path="$ipath"
31621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31622    windows_path=`$CYGPATH -m "$unix_path"`
31623    ipath="$windows_path"
31624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31625    windows_path=`cmd //c echo $unix_path`
31626    ipath="$windows_path"
31627  fi
31628
31629      VS_INCLUDE="$VS_INCLUDE;$ipath"
31630    done
31631    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31632    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31633    for i in $DEVKIT_VS_LIB; do
31634      libpath=$i
31635
31636  unix_path="$libpath"
31637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31638    windows_path=`$CYGPATH -m "$unix_path"`
31639    libpath="$windows_path"
31640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31641    windows_path=`cmd //c echo $unix_path`
31642    libpath="$windows_path"
31643  fi
31644
31645      VS_LIB="$VS_LIB;$libpath"
31646    done
31647    IFS="$OLDIFS"
31648
31649    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31650$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31651
31652  elif test "x$with_toolchain_version" != x; then
31653    # User override; check that it is valid
31654    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31655      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31656$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31657      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31658$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31659      as_fn_error $? "Cannot continue." "$LINENO" 5
31660    fi
31661    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31662  else
31663    # No flag given, use default
31664    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31665  fi
31666
31667  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31668
31669  VS_VERSION="$VS_VERSION"
31670  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31671  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31672  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31673  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31674
31675  # When using --with-tools-dir, assume it points to the correct and default
31676  # version of Visual Studio or that --with-toolchain-version was also set.
31677  if test "x$with_tools_dir" != x; then
31678
31679  if test "x$VS_ENV_CMD" = x; then
31680    VS_VERSION="${VS_VERSION}"
31681    VS_BASE="$with_tools_dir/../.."
31682    METHOD="--with-tools-dir"
31683
31684    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31685      VCVARSFILE="vc/bin/vcvars32.bat"
31686    else
31687      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31688    fi
31689
31690
31691  windows_path="$VS_BASE"
31692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31693    unix_path=`$CYGPATH -u "$windows_path"`
31694    VS_BASE="$unix_path"
31695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31696    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31697    VS_BASE="$unix_path"
31698  fi
31699
31700    if test -d "$VS_BASE"; then
31701      if test -f "$VS_BASE/$VCVARSFILE"; then
31702        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31703$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31704        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31705        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31706        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31707        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31708      else
31709        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31710$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31711        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31712$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31713      fi
31714    fi
31715  fi
31716
31717
31718  if test "x$VS_ENV_CMD" = x; then
31719    VS_VERSION="${VS_VERSION}"
31720    VS_BASE="$with_tools_dir/../../.."
31721    METHOD="--with-tools-dir"
31722
31723    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31724      VCVARSFILE="vc/bin/vcvars32.bat"
31725    else
31726      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31727    fi
31728
31729
31730  windows_path="$VS_BASE"
31731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31732    unix_path=`$CYGPATH -u "$windows_path"`
31733    VS_BASE="$unix_path"
31734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31736    VS_BASE="$unix_path"
31737  fi
31738
31739    if test -d "$VS_BASE"; then
31740      if test -f "$VS_BASE/$VCVARSFILE"; then
31741        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31742$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31743        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31744        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31745        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31746        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31747      else
31748        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31749$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31750        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31751$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31752      fi
31753    fi
31754  fi
31755
31756    if test "x$VS_ENV_CMD" = x; then
31757      # Having specified an argument which is incorrect will produce an instant failure;
31758      # we should not go on looking
31759      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31760$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31761      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31762$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31763      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31764$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31765      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31766    fi
31767  fi
31768
31769  VS_ENV_CMD=""
31770  VS_ENV_ARGS=""
31771
31772  if test "x$VS_COMNTOOLS" != x; then
31773
31774  if test "x$VS_ENV_CMD" = x; then
31775    VS_VERSION="${VS_VERSION}"
31776    VS_BASE="$VS_COMNTOOLS/../.."
31777    METHOD="$VS_COMNTOOLS_VAR variable"
31778
31779    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31780      VCVARSFILE="vc/bin/vcvars32.bat"
31781    else
31782      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31783    fi
31784
31785
31786  windows_path="$VS_BASE"
31787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31788    unix_path=`$CYGPATH -u "$windows_path"`
31789    VS_BASE="$unix_path"
31790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31791    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31792    VS_BASE="$unix_path"
31793  fi
31794
31795    if test -d "$VS_BASE"; then
31796      if test -f "$VS_BASE/$VCVARSFILE"; then
31797        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31798$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31799        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31800        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31801        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31802        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31803      else
31804        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31805$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31806        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31807$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31808      fi
31809    fi
31810  fi
31811
31812  fi
31813  if test "x$PROGRAMFILES" != x; then
31814
31815  if test "x$VS_ENV_CMD" = x; then
31816    VS_VERSION="${VS_VERSION}"
31817    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31818    METHOD="well-known name"
31819
31820    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31821      VCVARSFILE="vc/bin/vcvars32.bat"
31822    else
31823      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31824    fi
31825
31826
31827  windows_path="$VS_BASE"
31828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31829    unix_path=`$CYGPATH -u "$windows_path"`
31830    VS_BASE="$unix_path"
31831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31833    VS_BASE="$unix_path"
31834  fi
31835
31836    if test -d "$VS_BASE"; then
31837      if test -f "$VS_BASE/$VCVARSFILE"; then
31838        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31839$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31840        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31841        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31842        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31843        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31844      else
31845        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31846$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31847        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31848$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31849      fi
31850    fi
31851  fi
31852
31853  fi
31854  # Work around the insanely named ProgramFiles(x86) env variable
31855  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31856  if test "x$PROGRAMFILES_X86" != x; then
31857
31858  if test "x$VS_ENV_CMD" = x; then
31859    VS_VERSION="${VS_VERSION}"
31860    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31861    METHOD="well-known name"
31862
31863    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31864      VCVARSFILE="vc/bin/vcvars32.bat"
31865    else
31866      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31867    fi
31868
31869
31870  windows_path="$VS_BASE"
31871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31872    unix_path=`$CYGPATH -u "$windows_path"`
31873    VS_BASE="$unix_path"
31874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31876    VS_BASE="$unix_path"
31877  fi
31878
31879    if test -d "$VS_BASE"; then
31880      if test -f "$VS_BASE/$VCVARSFILE"; then
31881        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31882$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31883        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31884        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31885        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31886        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31887      else
31888        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31889$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31890        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31891$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31892      fi
31893    fi
31894  fi
31895
31896  fi
31897
31898  if test "x$VS_ENV_CMD" = x; then
31899    VS_VERSION="${VS_VERSION}"
31900    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31901    METHOD="well-known name"
31902
31903    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31904      VCVARSFILE="vc/bin/vcvars32.bat"
31905    else
31906      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31907    fi
31908
31909
31910  windows_path="$VS_BASE"
31911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31912    unix_path=`$CYGPATH -u "$windows_path"`
31913    VS_BASE="$unix_path"
31914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31916    VS_BASE="$unix_path"
31917  fi
31918
31919    if test -d "$VS_BASE"; then
31920      if test -f "$VS_BASE/$VCVARSFILE"; then
31921        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31922$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31923        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31924        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31925        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31926        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31927      else
31928        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31929$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31930        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31931$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31932      fi
31933    fi
31934  fi
31935
31936
31937  if test "x$VS_ENV_CMD" = x; then
31938    VS_VERSION="${VS_VERSION}"
31939    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31940    METHOD="well-known name"
31941
31942    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31943      VCVARSFILE="vc/bin/vcvars32.bat"
31944    else
31945      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31946    fi
31947
31948
31949  windows_path="$VS_BASE"
31950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31951    unix_path=`$CYGPATH -u "$windows_path"`
31952    VS_BASE="$unix_path"
31953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31955    VS_BASE="$unix_path"
31956  fi
31957
31958    if test -d "$VS_BASE"; then
31959      if test -f "$VS_BASE/$VCVARSFILE"; then
31960        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31961$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31962        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31963        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31964        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31965        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31966      else
31967        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31968$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31969        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31970$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31971      fi
31972    fi
31973  fi
31974
31975
31976  if test "x$SDK_INSTALL_DIR" != x; then
31977    if test "x$ProgramW6432" != x; then
31978
31979  if test "x$VS_ENV_CMD" = x; then
31980    VS_VERSION="${VS_VERSION}"
31981    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
31982    METHOD="well-known name"
31983
31984  windows_path="$WIN_SDK_BASE"
31985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31986    unix_path=`$CYGPATH -u "$windows_path"`
31987    WIN_SDK_BASE="$unix_path"
31988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31990    WIN_SDK_BASE="$unix_path"
31991  fi
31992
31993    if test -d "$WIN_SDK_BASE"; then
31994      # There have been cases of partial or broken SDK installations. A missing
31995      # lib dir is not going to work.
31996      if test ! -d "$WIN_SDK_BASE/lib"; then
31997        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31998$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31999        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32000$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32001      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32002        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32003$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32004        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32005        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32006          VS_ENV_ARGS="/x86"
32007        else
32008          VS_ENV_ARGS="/x64"
32009        fi
32010        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32011        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32012        # TODO: improve detection for other versions of SDK
32013        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32014      else
32015        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32016$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32017        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32018$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32019      fi
32020    fi
32021  fi
32022
32023    fi
32024    if test "x$PROGRAMW6432" != x; then
32025
32026  if test "x$VS_ENV_CMD" = x; then
32027    VS_VERSION="${VS_VERSION}"
32028    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32029    METHOD="well-known name"
32030
32031  windows_path="$WIN_SDK_BASE"
32032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32033    unix_path=`$CYGPATH -u "$windows_path"`
32034    WIN_SDK_BASE="$unix_path"
32035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32037    WIN_SDK_BASE="$unix_path"
32038  fi
32039
32040    if test -d "$WIN_SDK_BASE"; then
32041      # There have been cases of partial or broken SDK installations. A missing
32042      # lib dir is not going to work.
32043      if test ! -d "$WIN_SDK_BASE/lib"; then
32044        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32045$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32046        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32047$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32048      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32049        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32050$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32051        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32052        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32053          VS_ENV_ARGS="/x86"
32054        else
32055          VS_ENV_ARGS="/x64"
32056        fi
32057        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32058        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32059        # TODO: improve detection for other versions of SDK
32060        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32061      else
32062        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32063$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32064        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32065$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32066      fi
32067    fi
32068  fi
32069
32070    fi
32071    if test "x$PROGRAMFILES" != x; then
32072
32073  if test "x$VS_ENV_CMD" = x; then
32074    VS_VERSION="${VS_VERSION}"
32075    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32076    METHOD="well-known name"
32077
32078  windows_path="$WIN_SDK_BASE"
32079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32080    unix_path=`$CYGPATH -u "$windows_path"`
32081    WIN_SDK_BASE="$unix_path"
32082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32083    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32084    WIN_SDK_BASE="$unix_path"
32085  fi
32086
32087    if test -d "$WIN_SDK_BASE"; then
32088      # There have been cases of partial or broken SDK installations. A missing
32089      # lib dir is not going to work.
32090      if test ! -d "$WIN_SDK_BASE/lib"; then
32091        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32092$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32093        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32094$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32095      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32096        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32097$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32098        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32099        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32100          VS_ENV_ARGS="/x86"
32101        else
32102          VS_ENV_ARGS="/x64"
32103        fi
32104        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32105        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32106        # TODO: improve detection for other versions of SDK
32107        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32108      else
32109        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32110$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32111        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32112$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32113      fi
32114    fi
32115  fi
32116
32117    fi
32118
32119  if test "x$VS_ENV_CMD" = x; then
32120    VS_VERSION="${VS_VERSION}"
32121    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32122    METHOD="well-known name"
32123
32124  windows_path="$WIN_SDK_BASE"
32125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32126    unix_path=`$CYGPATH -u "$windows_path"`
32127    WIN_SDK_BASE="$unix_path"
32128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32130    WIN_SDK_BASE="$unix_path"
32131  fi
32132
32133    if test -d "$WIN_SDK_BASE"; then
32134      # There have been cases of partial or broken SDK installations. A missing
32135      # lib dir is not going to work.
32136      if test ! -d "$WIN_SDK_BASE/lib"; then
32137        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32138$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32139        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32140$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32141      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32142        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32143$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32144        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32145        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32146          VS_ENV_ARGS="/x86"
32147        else
32148          VS_ENV_ARGS="/x64"
32149        fi
32150        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32151        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32152        # TODO: improve detection for other versions of SDK
32153        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32154      else
32155        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32156$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32157        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32158$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32159      fi
32160    fi
32161  fi
32162
32163
32164  if test "x$VS_ENV_CMD" = x; then
32165    VS_VERSION="${VS_VERSION}"
32166    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32167    METHOD="well-known name"
32168
32169  windows_path="$WIN_SDK_BASE"
32170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32171    unix_path=`$CYGPATH -u "$windows_path"`
32172    WIN_SDK_BASE="$unix_path"
32173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32174    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32175    WIN_SDK_BASE="$unix_path"
32176  fi
32177
32178    if test -d "$WIN_SDK_BASE"; then
32179      # There have been cases of partial or broken SDK installations. A missing
32180      # lib dir is not going to work.
32181      if test ! -d "$WIN_SDK_BASE/lib"; then
32182        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32183$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32184        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32185$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32186      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32187        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32188$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32189        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32190        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32191          VS_ENV_ARGS="/x86"
32192        else
32193          VS_ENV_ARGS="/x64"
32194        fi
32195        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32196        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32197        # TODO: improve detection for other versions of SDK
32198        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32199      else
32200        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32201$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32202        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32203$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32204      fi
32205    fi
32206  fi
32207
32208  fi
32209
32210    if test "x$VS_ENV_CMD" != x; then
32211      TOOLCHAIN_VERSION=$VS_VERSION
32212      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32213      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32214      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32215      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32216      # The rest of the variables are already evaled while probing
32217      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32218$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32219      break
32220    fi
32221  done
32222
32223
32224  # If we have a devkit, skip all of the below.
32225  if test "x$DEVKIT_VS_VERSION" = x; then
32226    if test "x$VS_ENV_CMD" != x; then
32227      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32228
32229  # Only process if variable expands to non-empty
32230
32231  if test "x$VS_ENV_CMD" != x; then
32232    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32233
32234  # First separate the path from the arguments. This will split at the first
32235  # space.
32236  complete="$VS_ENV_CMD"
32237  path="${complete%% *}"
32238  tmp="$complete EOL"
32239  arguments="${tmp#* }"
32240
32241  # Input might be given as Windows format, start by converting to
32242  # unix format.
32243  new_path=`$CYGPATH -u "$path"`
32244
32245  # Now try to locate executable using which
32246  new_path=`$WHICH "$new_path" 2> /dev/null`
32247  # bat and cmd files are not always considered executable in cygwin causing which
32248  # to not find them
32249  if test "x$new_path" = x \
32250      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32251      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32252    new_path=`$CYGPATH -u "$path"`
32253  fi
32254  if test "x$new_path" = x; then
32255    # Oops. Which didn't find the executable.
32256    # The splitting of arguments from the executable at a space might have been incorrect,
32257    # since paths with space are more likely in Windows. Give it another try with the whole
32258    # argument.
32259    path="$complete"
32260    arguments="EOL"
32261    new_path=`$CYGPATH -u "$path"`
32262    new_path=`$WHICH "$new_path" 2> /dev/null`
32263    # bat and cmd files are not always considered executable in cygwin causing which
32264    # to not find them
32265    if test "x$new_path" = x \
32266        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32267        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32268      new_path=`$CYGPATH -u "$path"`
32269    fi
32270    if test "x$new_path" = x; then
32271      # It's still not found. Now this is an unrecoverable error.
32272      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32273$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32274      has_space=`$ECHO "$complete" | $GREP " "`
32275      if test "x$has_space" != x; then
32276        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32277$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32278      fi
32279      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32280    fi
32281  fi
32282
32283  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32284  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32285  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32286  # "foo.exe" is OK but "foo" is an error.
32287  #
32288  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32289  # It is also a way to make sure we got the proper file name for the real test later on.
32290  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32291  if test "x$test_shortpath" = x; then
32292    # Short path failed, file does not exist as specified.
32293    # Try adding .exe or .cmd
32294    if test -f "${new_path}.exe"; then
32295      input_to_shortpath="${new_path}.exe"
32296    elif test -f "${new_path}.cmd"; then
32297      input_to_shortpath="${new_path}.cmd"
32298    else
32299      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32300$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32301      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32302$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32303      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32304    fi
32305  else
32306    input_to_shortpath="$new_path"
32307  fi
32308
32309  # Call helper function which possibly converts this using DOS-style short mode.
32310  # If so, the updated path is stored in $new_path.
32311  new_path="$input_to_shortpath"
32312
32313  input_path="$input_to_shortpath"
32314  # Check if we need to convert this using DOS-style short mode. If the path
32315  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32316  # take no chances and rewrite it.
32317  # Note: m4 eats our [], so we need to use [ and ] instead.
32318  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32319  if test "x$has_forbidden_chars" != x; then
32320    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32321    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32322    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32323    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32324      # Going to short mode and back again did indeed matter. Since short mode is
32325      # case insensitive, let's make it lowercase to improve readability.
32326      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32327      # Now convert it back to Unix-style (cygpath)
32328      input_path=`$CYGPATH -u "$shortmode_path"`
32329      new_path="$input_path"
32330    fi
32331  fi
32332
32333  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32334  if test "x$test_cygdrive_prefix" = x; then
32335    # As a simple fix, exclude /usr/bin since it's not a real path.
32336    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32337      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32338      # a path prefixed by /cygdrive for fixpath to work.
32339      new_path="$CYGWIN_ROOT_PATH$input_path"
32340    fi
32341  fi
32342
32343  # remove trailing .exe if any
32344  new_path="${new_path/%.exe/}"
32345
32346    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32347
32348  # First separate the path from the arguments. This will split at the first
32349  # space.
32350  complete="$VS_ENV_CMD"
32351  path="${complete%% *}"
32352  tmp="$complete EOL"
32353  arguments="${tmp#* }"
32354
32355  # Input might be given as Windows format, start by converting to
32356  # unix format.
32357  new_path="$path"
32358
32359  windows_path="$new_path"
32360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32361    unix_path=`$CYGPATH -u "$windows_path"`
32362    new_path="$unix_path"
32363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32365    new_path="$unix_path"
32366  fi
32367
32368
32369  # Now try to locate executable using which
32370  new_path=`$WHICH "$new_path" 2> /dev/null`
32371
32372  if test "x$new_path" = x; then
32373    # Oops. Which didn't find the executable.
32374    # The splitting of arguments from the executable at a space might have been incorrect,
32375    # since paths with space are more likely in Windows. Give it another try with the whole
32376    # argument.
32377    path="$complete"
32378    arguments="EOL"
32379    new_path="$path"
32380
32381  windows_path="$new_path"
32382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32383    unix_path=`$CYGPATH -u "$windows_path"`
32384    new_path="$unix_path"
32385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32387    new_path="$unix_path"
32388  fi
32389
32390
32391    new_path=`$WHICH "$new_path" 2> /dev/null`
32392    # bat and cmd files are not always considered executable in MSYS causing which
32393    # to not find them
32394    if test "x$new_path" = x \
32395        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32396        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32397      new_path="$path"
32398
32399  windows_path="$new_path"
32400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32401    unix_path=`$CYGPATH -u "$windows_path"`
32402    new_path="$unix_path"
32403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32405    new_path="$unix_path"
32406  fi
32407
32408    fi
32409
32410    if test "x$new_path" = x; then
32411      # It's still not found. Now this is an unrecoverable error.
32412      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32413$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32414      has_space=`$ECHO "$complete" | $GREP " "`
32415      if test "x$has_space" != x; then
32416        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32417$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32418      fi
32419      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32420    fi
32421  fi
32422
32423  # Now new_path has a complete unix path to the binary
32424  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32425    # Keep paths in /bin as-is, but remove trailing .exe if any
32426    new_path="${new_path/%.exe/}"
32427    # Do not save /bin paths to all_fixpath_prefixes!
32428  else
32429    # Not in mixed or Windows style, start by that.
32430    new_path=`cmd //c echo $new_path`
32431
32432  input_path="$new_path"
32433  # Check if we need to convert this using DOS-style short mode. If the path
32434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32435  # take no chances and rewrite it.
32436  # Note: m4 eats our [], so we need to use [ and ] instead.
32437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32438  if test "x$has_forbidden_chars" != x; then
32439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32440    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32441  fi
32442
32443    # Output is in $new_path
32444
32445  windows_path="$new_path"
32446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32447    unix_path=`$CYGPATH -u "$windows_path"`
32448    new_path="$unix_path"
32449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32451    new_path="$unix_path"
32452  fi
32453
32454    # remove trailing .exe if any
32455    new_path="${new_path/%.exe/}"
32456
32457    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32458    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32459  fi
32460
32461    else
32462      # We're on a unix platform. Hooray! :)
32463      # First separate the path from the arguments. This will split at the first
32464      # space.
32465      complete="$VS_ENV_CMD"
32466      path="${complete%% *}"
32467      tmp="$complete EOL"
32468      arguments="${tmp#* }"
32469
32470      # Cannot rely on the command "which" here since it doesn't always work.
32471      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32472      if test -z "$is_absolute_path"; then
32473        # Path to executable is not absolute. Find it.
32474        IFS_save="$IFS"
32475        IFS=:
32476        for p in $PATH; do
32477          if test -f "$p/$path" && test -x "$p/$path"; then
32478            new_path="$p/$path"
32479            break
32480          fi
32481        done
32482        IFS="$IFS_save"
32483      else
32484        # This is an absolute path, we can use it without further modifications.
32485        new_path="$path"
32486      fi
32487
32488      if test "x$new_path" = x; then
32489        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32490$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32491        has_space=`$ECHO "$complete" | $GREP " "`
32492        if test "x$has_space" != x; then
32493          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32494$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32495        fi
32496        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32497      fi
32498    fi
32499
32500    # Now join together the path and the arguments once again
32501    if test "x$arguments" != xEOL; then
32502      new_complete="$new_path ${arguments% *}"
32503    else
32504      new_complete="$new_path"
32505    fi
32506
32507    if test "x$complete" != "x$new_complete"; then
32508      VS_ENV_CMD="$new_complete"
32509      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32510$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32511    fi
32512  fi
32513
32514
32515      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32516      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32517$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32518
32519      # We need to create a couple of temporary files.
32520      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32521      $MKDIR -p $VS_ENV_TMP_DIR
32522
32523      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32524      # Instead create a shell script which will set the relevant variables when run.
32525      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32526
32527  unix_path="$WINPATH_VS_ENV_CMD"
32528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32529    windows_path=`$CYGPATH -m "$unix_path"`
32530    WINPATH_VS_ENV_CMD="$windows_path"
32531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32532    windows_path=`cmd //c echo $unix_path`
32533    WINPATH_VS_ENV_CMD="$windows_path"
32534  fi
32535
32536      WINPATH_BASH="$BASH"
32537
32538  unix_path="$WINPATH_BASH"
32539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32540    windows_path=`$CYGPATH -m "$unix_path"`
32541    WINPATH_BASH="$windows_path"
32542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32543    windows_path=`cmd //c echo $unix_path`
32544    WINPATH_BASH="$windows_path"
32545  fi
32546
32547
32548      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32549      # script (executable by bash) that will setup the important variables.
32550      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32551      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32552      # This will end up something like:
32553      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32554      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32555      # These will end up something like:
32556      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32557      # The trailing space for everyone except PATH is no typo, but is needed due
32558      # to trailing \ in the Windows paths. These will be stripped later.
32559      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32560          >> $EXTRACT_VC_ENV_BAT_FILE
32561      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32562          >> $EXTRACT_VC_ENV_BAT_FILE
32563      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32564          >> $EXTRACT_VC_ENV_BAT_FILE
32565      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32566          >> $EXTRACT_VC_ENV_BAT_FILE
32567      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32568          >> $EXTRACT_VC_ENV_BAT_FILE
32569      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32570          >> $EXTRACT_VC_ENV_BAT_FILE
32571
32572      # Now execute the newly created bat file.
32573      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32574      # Change directory so we don't need to mess with Windows paths in redirects.
32575      cd $VS_ENV_TMP_DIR
32576      cmd /c extract-vs-env.bat | $CAT
32577      cd $CURDIR
32578
32579      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32580        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32581$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32582        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32583$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32584        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32585$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32586        as_fn_error $? "Cannot continue" "$LINENO" 5
32587      fi
32588
32589      # Now set all paths and other env variables. This will allow the rest of
32590      # the configure script to find and run the compiler in the proper way.
32591      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32592$as_echo "$as_me: Setting extracted environment variables" >&6;}
32593      . $VS_ENV_TMP_DIR/set-vs-env.sh
32594      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32595      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32596    else
32597      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32598      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32599$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32600    fi
32601  fi
32602
32603  # At this point, we should have correct variables in the environment, or we can't continue.
32604  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32605$as_echo_n "checking for Visual Studio variables... " >&6; }
32606
32607  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32608      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32609    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32610      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32611$as_echo "present but broken" >&6; }
32612      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32613    else
32614      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32615$as_echo "ok" >&6; }
32616      # Remove any trailing "\" ";" and " " from the variables.
32617      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32618      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32619      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32620      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32621      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32622      # Remove any paths containing # (typically F#) as that messes up make. This
32623      # is needed if visual studio was installed with F# support.
32624      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32625
32626
32627
32628
32629
32630      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32631      OLDIFS="$IFS"
32632      IFS=";"
32633      for i in $VS_INCLUDE; do
32634        ipath=$i
32635        # Only process non-empty elements
32636        if test "x$ipath" != x; then
32637          IFS="$OLDIFS"
32638          # Check that directory exists before calling fixup_path
32639          testpath=$ipath
32640
32641  windows_path="$testpath"
32642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32643    unix_path=`$CYGPATH -u "$windows_path"`
32644    testpath="$unix_path"
32645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32647    testpath="$unix_path"
32648  fi
32649
32650          if test -d "$testpath"; then
32651
32652  # Only process if variable expands to non-empty
32653
32654  if test "x$ipath" != x; then
32655    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32656
32657  # Input might be given as Windows format, start by converting to
32658  # unix format.
32659  path="$ipath"
32660  new_path=`$CYGPATH -u "$path"`
32661
32662  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32663  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32664  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32665  # "foo.exe" is OK but "foo" is an error.
32666  #
32667  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32668  # It is also a way to make sure we got the proper file name for the real test later on.
32669  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32670  if test "x$test_shortpath" = x; then
32671    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32672$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32673    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32674  fi
32675
32676  # Call helper function which possibly converts this using DOS-style short mode.
32677  # If so, the updated path is stored in $new_path.
32678
32679  input_path="$new_path"
32680  # Check if we need to convert this using DOS-style short mode. If the path
32681  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32682  # take no chances and rewrite it.
32683  # Note: m4 eats our [], so we need to use [ and ] instead.
32684  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32685  if test "x$has_forbidden_chars" != x; then
32686    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32687    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32688    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32689    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32690      # Going to short mode and back again did indeed matter. Since short mode is
32691      # case insensitive, let's make it lowercase to improve readability.
32692      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32693      # Now convert it back to Unix-style (cygpath)
32694      input_path=`$CYGPATH -u "$shortmode_path"`
32695      new_path="$input_path"
32696    fi
32697  fi
32698
32699  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32700  if test "x$test_cygdrive_prefix" = x; then
32701    # As a simple fix, exclude /usr/bin since it's not a real path.
32702    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32703      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32704      # a path prefixed by /cygdrive for fixpath to work.
32705      new_path="$CYGWIN_ROOT_PATH$input_path"
32706    fi
32707  fi
32708
32709
32710  if test "x$path" != "x$new_path"; then
32711    ipath="$new_path"
32712    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32713$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32714  fi
32715
32716    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32717
32718  path="$ipath"
32719  has_colon=`$ECHO $path | $GREP ^.:`
32720  new_path="$path"
32721  if test "x$has_colon" = x; then
32722    # Not in mixed or Windows style, start by that.
32723    new_path=`cmd //c echo $path`
32724  fi
32725
32726
32727  input_path="$new_path"
32728  # Check if we need to convert this using DOS-style short mode. If the path
32729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32730  # take no chances and rewrite it.
32731  # Note: m4 eats our [], so we need to use [ and ] instead.
32732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32733  if test "x$has_forbidden_chars" != x; then
32734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32735    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32736  fi
32737
32738
32739  windows_path="$new_path"
32740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32741    unix_path=`$CYGPATH -u "$windows_path"`
32742    new_path="$unix_path"
32743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32745    new_path="$unix_path"
32746  fi
32747
32748  if test "x$path" != "x$new_path"; then
32749    ipath="$new_path"
32750    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32751$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32752  fi
32753
32754  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32755  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32756
32757    else
32758      # We're on a unix platform. Hooray! :)
32759      path="$ipath"
32760      has_space=`$ECHO "$path" | $GREP " "`
32761      if test "x$has_space" != x; then
32762        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32763$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32764        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32765      fi
32766
32767      # Use eval to expand a potential ~
32768      eval path="$path"
32769      if test ! -f "$path" && test ! -d "$path"; then
32770        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32771      fi
32772
32773      if test -d "$path"; then
32774        ipath="`cd "$path"; $THEPWDCMD -L`"
32775      else
32776        dir="`$DIRNAME "$path"`"
32777        base="`$BASENAME "$path"`"
32778        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32779      fi
32780    fi
32781  fi
32782
32783            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32784          fi
32785          IFS=";"
32786        fi
32787      done
32788      # Convert VS_LIB into SYSROOT_LDFLAGS
32789      for i in $VS_LIB; do
32790        libpath=$i
32791        # Only process non-empty elements
32792        if test "x$libpath" != x; then
32793          IFS="$OLDIFS"
32794          # Check that directory exists before calling fixup_path
32795          testpath=$libpath
32796
32797  windows_path="$testpath"
32798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32799    unix_path=`$CYGPATH -u "$windows_path"`
32800    testpath="$unix_path"
32801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32803    testpath="$unix_path"
32804  fi
32805
32806          if test -d "$testpath"; then
32807
32808  # Only process if variable expands to non-empty
32809
32810  if test "x$libpath" != x; then
32811    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32812
32813  # Input might be given as Windows format, start by converting to
32814  # unix format.
32815  path="$libpath"
32816  new_path=`$CYGPATH -u "$path"`
32817
32818  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32819  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32820  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32821  # "foo.exe" is OK but "foo" is an error.
32822  #
32823  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32824  # It is also a way to make sure we got the proper file name for the real test later on.
32825  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32826  if test "x$test_shortpath" = x; then
32827    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32828$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32829    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32830  fi
32831
32832  # Call helper function which possibly converts this using DOS-style short mode.
32833  # If so, the updated path is stored in $new_path.
32834
32835  input_path="$new_path"
32836  # Check if we need to convert this using DOS-style short mode. If the path
32837  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32838  # take no chances and rewrite it.
32839  # Note: m4 eats our [], so we need to use [ and ] instead.
32840  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32841  if test "x$has_forbidden_chars" != x; then
32842    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32843    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32844    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32845    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32846      # Going to short mode and back again did indeed matter. Since short mode is
32847      # case insensitive, let's make it lowercase to improve readability.
32848      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32849      # Now convert it back to Unix-style (cygpath)
32850      input_path=`$CYGPATH -u "$shortmode_path"`
32851      new_path="$input_path"
32852    fi
32853  fi
32854
32855  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32856  if test "x$test_cygdrive_prefix" = x; then
32857    # As a simple fix, exclude /usr/bin since it's not a real path.
32858    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32859      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32860      # a path prefixed by /cygdrive for fixpath to work.
32861      new_path="$CYGWIN_ROOT_PATH$input_path"
32862    fi
32863  fi
32864
32865
32866  if test "x$path" != "x$new_path"; then
32867    libpath="$new_path"
32868    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32869$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32870  fi
32871
32872    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32873
32874  path="$libpath"
32875  has_colon=`$ECHO $path | $GREP ^.:`
32876  new_path="$path"
32877  if test "x$has_colon" = x; then
32878    # Not in mixed or Windows style, start by that.
32879    new_path=`cmd //c echo $path`
32880  fi
32881
32882
32883  input_path="$new_path"
32884  # Check if we need to convert this using DOS-style short mode. If the path
32885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32886  # take no chances and rewrite it.
32887  # Note: m4 eats our [], so we need to use [ and ] instead.
32888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32889  if test "x$has_forbidden_chars" != x; then
32890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32891    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32892  fi
32893
32894
32895  windows_path="$new_path"
32896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32897    unix_path=`$CYGPATH -u "$windows_path"`
32898    new_path="$unix_path"
32899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32901    new_path="$unix_path"
32902  fi
32903
32904  if test "x$path" != "x$new_path"; then
32905    libpath="$new_path"
32906    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32907$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32908  fi
32909
32910  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32911  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32912
32913    else
32914      # We're on a unix platform. Hooray! :)
32915      path="$libpath"
32916      has_space=`$ECHO "$path" | $GREP " "`
32917      if test "x$has_space" != x; then
32918        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32919$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32920        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32921      fi
32922
32923      # Use eval to expand a potential ~
32924      eval path="$path"
32925      if test ! -f "$path" && test ! -d "$path"; then
32926        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32927      fi
32928
32929      if test -d "$path"; then
32930        libpath="`cd "$path"; $THEPWDCMD -L`"
32931      else
32932        dir="`$DIRNAME "$path"`"
32933        base="`$BASENAME "$path"`"
32934        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32935      fi
32936    fi
32937  fi
32938
32939            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32940          fi
32941          IFS=";"
32942        fi
32943      done
32944      IFS="$OLDIFS"
32945    fi
32946  else
32947    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32948$as_echo "not found" >&6; }
32949
32950    if test "x$VS_ENV_CMD" = x; then
32951      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32952$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32953      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32954$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32955    else
32956      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32957$as_echo "$as_me: Running the extraction script failed." >&6;}
32958    fi
32959    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32960$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32961    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32962$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32963    as_fn_error $? "Cannot continue" "$LINENO" 5
32964  fi
32965
32966    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32967    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32968    PATH="$VS_PATH"
32969    # The microsoft toolchain also requires INCLUDE and LIB to be set.
32970    export INCLUDE="$VS_INCLUDE"
32971    export LIB="$VS_LIB"
32972  else
32973    if test "x$XCODE_VERSION_OUTPUT" != x; then
32974      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
32975      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
32976      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
32977    else
32978      # Currently we do not define this for other toolchains. This might change as the need arise.
32979      TOOLCHAIN_VERSION=
32980    fi
32981  fi
32982
32983
32984  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
32985  # override all other locations.
32986  if test "x$TOOLCHAIN_PATH" != x; then
32987    PATH=$TOOLCHAIN_PATH:$PATH
32988  fi
32989
32990
32991  #
32992  # Setup the compilers (CC and CXX)
32993  #
32994
32995  COMPILER_NAME=C
32996  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
32997
32998  if test "x$CC" != x; then
32999    # User has supplied compiler name already, always let that override.
33000    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33001$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33002    if test "x`basename $CC`" = "x$CC"; then
33003      # A command without a complete path is provided, search $PATH.
33004
33005      for ac_prog in $CC
33006do
33007  # Extract the first word of "$ac_prog", so it can be a program name with args.
33008set dummy $ac_prog; ac_word=$2
33009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33010$as_echo_n "checking for $ac_word... " >&6; }
33011if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33012  $as_echo_n "(cached) " >&6
33013else
33014  case $POTENTIAL_CC in
33015  [\\/]* | ?:[\\/]*)
33016  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33017  ;;
33018  *)
33019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33020for as_dir in $PATH
33021do
33022  IFS=$as_save_IFS
33023  test -z "$as_dir" && as_dir=.
33024    for ac_exec_ext in '' $ac_executable_extensions; do
33025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33026    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33028    break 2
33029  fi
33030done
33031  done
33032IFS=$as_save_IFS
33033
33034  ;;
33035esac
33036fi
33037POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33038if test -n "$POTENTIAL_CC"; then
33039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33040$as_echo "$POTENTIAL_CC" >&6; }
33041else
33042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33043$as_echo "no" >&6; }
33044fi
33045
33046
33047  test -n "$POTENTIAL_CC" && break
33048done
33049
33050      if test "x$POTENTIAL_CC" != x; then
33051        CC=$POTENTIAL_CC
33052      else
33053        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33054      fi
33055    else
33056      # Otherwise it might already be a complete path
33057      if test ! -x "$CC"; then
33058        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33059      fi
33060    fi
33061  else
33062    # No user supplied value. Locate compiler ourselves.
33063
33064    # If we are cross compiling, assume cross compilation tools follows the
33065    # cross compilation standard where they are prefixed with the autoconf
33066    # standard name for the target. For example the binary
33067    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33068    # If we are not cross compiling, then the default compiler name will be
33069    # used.
33070
33071    CC=
33072    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33073    # before checking the rest of the PATH.
33074    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33075    # step, this should not be necessary.
33076    if test -n "$TOOLCHAIN_PATH"; then
33077      PATH_save="$PATH"
33078      PATH="$TOOLCHAIN_PATH"
33079      for ac_prog in $SEARCH_LIST
33080do
33081  # Extract the first word of "$ac_prog", so it can be a program name with args.
33082set dummy $ac_prog; ac_word=$2
33083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33084$as_echo_n "checking for $ac_word... " >&6; }
33085if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33086  $as_echo_n "(cached) " >&6
33087else
33088  case $TOOLCHAIN_PATH_CC in
33089  [\\/]* | ?:[\\/]*)
33090  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33091  ;;
33092  *)
33093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33094for as_dir in $PATH
33095do
33096  IFS=$as_save_IFS
33097  test -z "$as_dir" && as_dir=.
33098    for ac_exec_ext in '' $ac_executable_extensions; do
33099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33100    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33102    break 2
33103  fi
33104done
33105  done
33106IFS=$as_save_IFS
33107
33108  ;;
33109esac
33110fi
33111TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33112if test -n "$TOOLCHAIN_PATH_CC"; then
33113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33114$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33115else
33116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33117$as_echo "no" >&6; }
33118fi
33119
33120
33121  test -n "$TOOLCHAIN_PATH_CC" && break
33122done
33123
33124      CC=$TOOLCHAIN_PATH_CC
33125      PATH="$PATH_save"
33126    fi
33127
33128    # AC_PATH_PROGS can't be run multiple times with the same variable,
33129    # so create a new name for this run.
33130    if test "x$CC" = x; then
33131      for ac_prog in $SEARCH_LIST
33132do
33133  # Extract the first word of "$ac_prog", so it can be a program name with args.
33134set dummy $ac_prog; ac_word=$2
33135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33136$as_echo_n "checking for $ac_word... " >&6; }
33137if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33138  $as_echo_n "(cached) " >&6
33139else
33140  case $POTENTIAL_CC in
33141  [\\/]* | ?:[\\/]*)
33142  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33143  ;;
33144  *)
33145  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33146for as_dir in $PATH
33147do
33148  IFS=$as_save_IFS
33149  test -z "$as_dir" && as_dir=.
33150    for ac_exec_ext in '' $ac_executable_extensions; do
33151  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33152    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33154    break 2
33155  fi
33156done
33157  done
33158IFS=$as_save_IFS
33159
33160  ;;
33161esac
33162fi
33163POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33164if test -n "$POTENTIAL_CC"; then
33165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33166$as_echo "$POTENTIAL_CC" >&6; }
33167else
33168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33169$as_echo "no" >&6; }
33170fi
33171
33172
33173  test -n "$POTENTIAL_CC" && break
33174done
33175
33176      CC=$POTENTIAL_CC
33177    fi
33178
33179    if test "x$CC" = x; then
33180
33181  # Print a helpful message on how to acquire the necessary build dependency.
33182  # devkit is the help tag: freetype, cups, alsa etc
33183  MISSING_DEPENDENCY=devkit
33184
33185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33186    cygwin_help $MISSING_DEPENDENCY
33187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33188    msys_help $MISSING_DEPENDENCY
33189  else
33190    PKGHANDLER_COMMAND=
33191
33192    case $PKGHANDLER in
33193      apt-get)
33194        apt_help     $MISSING_DEPENDENCY ;;
33195      yum)
33196        yum_help     $MISSING_DEPENDENCY ;;
33197      port)
33198        port_help    $MISSING_DEPENDENCY ;;
33199      pkgutil)
33200        pkgutil_help $MISSING_DEPENDENCY ;;
33201      pkgadd)
33202        pkgadd_help  $MISSING_DEPENDENCY ;;
33203    esac
33204
33205    if test "x$PKGHANDLER_COMMAND" != x; then
33206      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33207    fi
33208  fi
33209
33210      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33211    fi
33212  fi
33213
33214  # Now we have a compiler binary in CC. Make sure it's okay.
33215
33216  # Only process if variable expands to non-empty
33217
33218  if test "x$CC" != x; then
33219    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33220
33221  # First separate the path from the arguments. This will split at the first
33222  # space.
33223  complete="$CC"
33224  path="${complete%% *}"
33225  tmp="$complete EOL"
33226  arguments="${tmp#* }"
33227
33228  # Input might be given as Windows format, start by converting to
33229  # unix format.
33230  new_path=`$CYGPATH -u "$path"`
33231
33232  # Now try to locate executable using which
33233  new_path=`$WHICH "$new_path" 2> /dev/null`
33234  # bat and cmd files are not always considered executable in cygwin causing which
33235  # to not find them
33236  if test "x$new_path" = x \
33237      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33238      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33239    new_path=`$CYGPATH -u "$path"`
33240  fi
33241  if test "x$new_path" = x; then
33242    # Oops. Which didn't find the executable.
33243    # The splitting of arguments from the executable at a space might have been incorrect,
33244    # since paths with space are more likely in Windows. Give it another try with the whole
33245    # argument.
33246    path="$complete"
33247    arguments="EOL"
33248    new_path=`$CYGPATH -u "$path"`
33249    new_path=`$WHICH "$new_path" 2> /dev/null`
33250    # bat and cmd files are not always considered executable in cygwin causing which
33251    # to not find them
33252    if test "x$new_path" = x \
33253        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33254        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33255      new_path=`$CYGPATH -u "$path"`
33256    fi
33257    if test "x$new_path" = x; then
33258      # It's still not found. Now this is an unrecoverable error.
33259      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33260$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33261      has_space=`$ECHO "$complete" | $GREP " "`
33262      if test "x$has_space" != x; then
33263        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33264$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33265      fi
33266      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33267    fi
33268  fi
33269
33270  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33271  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33272  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33273  # "foo.exe" is OK but "foo" is an error.
33274  #
33275  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33276  # It is also a way to make sure we got the proper file name for the real test later on.
33277  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33278  if test "x$test_shortpath" = x; then
33279    # Short path failed, file does not exist as specified.
33280    # Try adding .exe or .cmd
33281    if test -f "${new_path}.exe"; then
33282      input_to_shortpath="${new_path}.exe"
33283    elif test -f "${new_path}.cmd"; then
33284      input_to_shortpath="${new_path}.cmd"
33285    else
33286      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33287$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33288      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33289$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33290      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33291    fi
33292  else
33293    input_to_shortpath="$new_path"
33294  fi
33295
33296  # Call helper function which possibly converts this using DOS-style short mode.
33297  # If so, the updated path is stored in $new_path.
33298  new_path="$input_to_shortpath"
33299
33300  input_path="$input_to_shortpath"
33301  # Check if we need to convert this using DOS-style short mode. If the path
33302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33303  # take no chances and rewrite it.
33304  # Note: m4 eats our [], so we need to use [ and ] instead.
33305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33306  if test "x$has_forbidden_chars" != x; then
33307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33308    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33309    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33310    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33311      # Going to short mode and back again did indeed matter. Since short mode is
33312      # case insensitive, let's make it lowercase to improve readability.
33313      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33314      # Now convert it back to Unix-style (cygpath)
33315      input_path=`$CYGPATH -u "$shortmode_path"`
33316      new_path="$input_path"
33317    fi
33318  fi
33319
33320  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33321  if test "x$test_cygdrive_prefix" = x; then
33322    # As a simple fix, exclude /usr/bin since it's not a real path.
33323    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33324      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33325      # a path prefixed by /cygdrive for fixpath to work.
33326      new_path="$CYGWIN_ROOT_PATH$input_path"
33327    fi
33328  fi
33329
33330  # remove trailing .exe if any
33331  new_path="${new_path/%.exe/}"
33332
33333    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33334
33335  # First separate the path from the arguments. This will split at the first
33336  # space.
33337  complete="$CC"
33338  path="${complete%% *}"
33339  tmp="$complete EOL"
33340  arguments="${tmp#* }"
33341
33342  # Input might be given as Windows format, start by converting to
33343  # unix format.
33344  new_path="$path"
33345
33346  windows_path="$new_path"
33347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33348    unix_path=`$CYGPATH -u "$windows_path"`
33349    new_path="$unix_path"
33350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33351    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33352    new_path="$unix_path"
33353  fi
33354
33355
33356  # Now try to locate executable using which
33357  new_path=`$WHICH "$new_path" 2> /dev/null`
33358
33359  if test "x$new_path" = x; then
33360    # Oops. Which didn't find the executable.
33361    # The splitting of arguments from the executable at a space might have been incorrect,
33362    # since paths with space are more likely in Windows. Give it another try with the whole
33363    # argument.
33364    path="$complete"
33365    arguments="EOL"
33366    new_path="$path"
33367
33368  windows_path="$new_path"
33369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33370    unix_path=`$CYGPATH -u "$windows_path"`
33371    new_path="$unix_path"
33372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33374    new_path="$unix_path"
33375  fi
33376
33377
33378    new_path=`$WHICH "$new_path" 2> /dev/null`
33379    # bat and cmd files are not always considered executable in MSYS causing which
33380    # to not find them
33381    if test "x$new_path" = x \
33382        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33383        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33384      new_path="$path"
33385
33386  windows_path="$new_path"
33387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33388    unix_path=`$CYGPATH -u "$windows_path"`
33389    new_path="$unix_path"
33390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33391    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33392    new_path="$unix_path"
33393  fi
33394
33395    fi
33396
33397    if test "x$new_path" = x; then
33398      # It's still not found. Now this is an unrecoverable error.
33399      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33400$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33401      has_space=`$ECHO "$complete" | $GREP " "`
33402      if test "x$has_space" != x; then
33403        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33404$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33405      fi
33406      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33407    fi
33408  fi
33409
33410  # Now new_path has a complete unix path to the binary
33411  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33412    # Keep paths in /bin as-is, but remove trailing .exe if any
33413    new_path="${new_path/%.exe/}"
33414    # Do not save /bin paths to all_fixpath_prefixes!
33415  else
33416    # Not in mixed or Windows style, start by that.
33417    new_path=`cmd //c echo $new_path`
33418
33419  input_path="$new_path"
33420  # Check if we need to convert this using DOS-style short mode. If the path
33421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33422  # take no chances and rewrite it.
33423  # Note: m4 eats our [], so we need to use [ and ] instead.
33424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33425  if test "x$has_forbidden_chars" != x; then
33426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33427    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33428  fi
33429
33430    # Output is in $new_path
33431
33432  windows_path="$new_path"
33433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33434    unix_path=`$CYGPATH -u "$windows_path"`
33435    new_path="$unix_path"
33436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33438    new_path="$unix_path"
33439  fi
33440
33441    # remove trailing .exe if any
33442    new_path="${new_path/%.exe/}"
33443
33444    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33445    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33446  fi
33447
33448    else
33449      # We're on a unix platform. Hooray! :)
33450      # First separate the path from the arguments. This will split at the first
33451      # space.
33452      complete="$CC"
33453      path="${complete%% *}"
33454      tmp="$complete EOL"
33455      arguments="${tmp#* }"
33456
33457      # Cannot rely on the command "which" here since it doesn't always work.
33458      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33459      if test -z "$is_absolute_path"; then
33460        # Path to executable is not absolute. Find it.
33461        IFS_save="$IFS"
33462        IFS=:
33463        for p in $PATH; do
33464          if test -f "$p/$path" && test -x "$p/$path"; then
33465            new_path="$p/$path"
33466            break
33467          fi
33468        done
33469        IFS="$IFS_save"
33470      else
33471        # This is an absolute path, we can use it without further modifications.
33472        new_path="$path"
33473      fi
33474
33475      if test "x$new_path" = x; then
33476        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33477$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33478        has_space=`$ECHO "$complete" | $GREP " "`
33479        if test "x$has_space" != x; then
33480          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33481$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33482        fi
33483        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33484      fi
33485    fi
33486
33487    # Now join together the path and the arguments once again
33488    if test "x$arguments" != xEOL; then
33489      new_complete="$new_path ${arguments% *}"
33490    else
33491      new_complete="$new_path"
33492    fi
33493
33494    if test "x$complete" != "x$new_complete"; then
33495      CC="$new_complete"
33496      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33497$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33498    fi
33499  fi
33500
33501  TEST_COMPILER="$CC"
33502
33503  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33504$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33505  SYMLINK_ORIGINAL="$TEST_COMPILER"
33506
33507  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33508    # Follow a chain of symbolic links. Use readlink
33509    # where it exists, else fall back to horribly
33510    # complicated shell code.
33511    if test "x$READLINK_TESTED" != yes; then
33512      # On MacOSX there is a readlink tool with a different
33513      # purpose than the GNU readlink tool. Check the found readlink.
33514      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33515      if test "x$ISGNU" = x; then
33516        # A readlink that we do not know how to use.
33517        # Are there other non-GNU readlinks out there?
33518        READLINK_TESTED=yes
33519        READLINK=
33520      fi
33521    fi
33522
33523    if test "x$READLINK" != x; then
33524      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33525    else
33526      # Save the current directory for restoring afterwards
33527      STARTDIR=$PWD
33528      COUNTER=0
33529      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33530      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33531      cd $sym_link_dir
33532      # Use -P flag to resolve symlinks in directories.
33533      cd `$THEPWDCMD -P`
33534      sym_link_dir=`$THEPWDCMD -P`
33535      # Resolve file symlinks
33536      while test $COUNTER -lt 20; do
33537        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33538        if test "x$ISLINK" == x; then
33539          # This is not a symbolic link! We are done!
33540          break
33541        fi
33542        # Again resolve directory symlinks since the target of the just found
33543        # link could be in a different directory
33544        cd `$DIRNAME $ISLINK`
33545        sym_link_dir=`$THEPWDCMD -P`
33546        sym_link_file=`$BASENAME $ISLINK`
33547        let COUNTER=COUNTER+1
33548      done
33549      cd $STARTDIR
33550      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33551    fi
33552  fi
33553
33554  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33555    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33556$as_echo "no symlink" >&6; }
33557  else
33558    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33559$as_echo "$SYMLINK_ORIGINAL" >&6; }
33560
33561    # We can't handle ccache by gcc wrappers, since we need to know if we're
33562    # using ccache. Instead ccache usage must be controlled by a configure option.
33563    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33564    if test "x$COMPILER_BASENAME" = "xccache"; then
33565      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33566$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33567      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33568    fi
33569  fi
33570
33571
33572  COMPILER=$CC
33573  COMPILER_NAME=$COMPILER_NAME
33574
33575  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33576    # cc -V output typically looks like
33577    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33578    # or
33579    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
33580    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33581    # Check that this is likely to be the Solaris Studio cc.
33582    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
33583    if test $? -ne 0; then
33584      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33585      { $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
33586$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33587      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33588$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33589      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33590$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33591      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33592    fi
33593    # Remove usage instructions (if present), and
33594    # collapse compiler output into a single line
33595    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33596        $SED -e 's/ *[Uu]sage:.*//'`
33597    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33598        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33599  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33600    # xlc -qversion output typically looks like
33601    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33602    #     Version: 11.01.0000.0015
33603    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33604    # Check that this is likely to be the IBM XL C compiler.
33605    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33606    if test $? -ne 0; then
33607      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33608      { $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
33609$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33610      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33611$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33612      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33613$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33614      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33615    fi
33616    # Collapse compiler output into a single line
33617    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33618    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33619        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33620  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33621    # There is no specific version flag, but all output starts with a version string.
33622    # First line typically looks something like:
33623    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33624    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33625    # Check that this is likely to be Microsoft CL.EXE.
33626    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33627    if test $? -ne 0; then
33628      { $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
33629$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33630      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33631$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33632      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33633    fi
33634    # Collapse compiler output into a single line
33635    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33636    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33637        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33638  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33639    # gcc --version output typically looks like
33640    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33641    #     Copyright (C) 2013 Free Software Foundation, Inc.
33642    #     This is free software; see the source for copying conditions.  There is NO
33643    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33644    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33645    # Check that this is likely to be GCC.
33646    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33647    if test $? -ne 0; then
33648      { $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
33649$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33650      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33651$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33652      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33653    fi
33654    # Remove Copyright and legalese from version string, and
33655    # collapse into a single line
33656    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33657        $SED -e 's/ *Copyright .*//'`
33658    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33659        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33660  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33661    # clang --version output typically looks like
33662    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33663    #    clang version 3.3 (tags/RELEASE_33/final)
33664    # or
33665    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33666    #    Target: x86_64-pc-linux-gnu
33667    #    Thread model: posix
33668    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33669    # Check that this is likely to be clang
33670    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33671    if test $? -ne 0; then
33672      { $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
33673$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33674      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33675$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33676      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33677    fi
33678    # Collapse compiler output into a single line
33679    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33680    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33681        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33682  else
33683      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33684  fi
33685  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33686  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33687  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33688  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33689
33690  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33691$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33692
33693
33694  # Now that we have resolved CC ourself, let autoconf have its go at it
33695  ac_ext=c
33696ac_cpp='$CPP $CPPFLAGS'
33697ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33698ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33699ac_compiler_gnu=$ac_cv_c_compiler_gnu
33700if test -n "$ac_tool_prefix"; then
33701  for ac_prog in $CC
33702  do
33703    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33704set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33706$as_echo_n "checking for $ac_word... " >&6; }
33707if ${ac_cv_prog_CC+:} false; then :
33708  $as_echo_n "(cached) " >&6
33709else
33710  if test -n "$CC"; then
33711  ac_cv_prog_CC="$CC" # Let the user override the test.
33712else
33713as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33714for as_dir in $PATH
33715do
33716  IFS=$as_save_IFS
33717  test -z "$as_dir" && as_dir=.
33718    for ac_exec_ext in '' $ac_executable_extensions; do
33719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33720    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33722    break 2
33723  fi
33724done
33725  done
33726IFS=$as_save_IFS
33727
33728fi
33729fi
33730CC=$ac_cv_prog_CC
33731if test -n "$CC"; then
33732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33733$as_echo "$CC" >&6; }
33734else
33735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33736$as_echo "no" >&6; }
33737fi
33738
33739
33740    test -n "$CC" && break
33741  done
33742fi
33743if test -z "$CC"; then
33744  ac_ct_CC=$CC
33745  for ac_prog in $CC
33746do
33747  # Extract the first word of "$ac_prog", so it can be a program name with args.
33748set dummy $ac_prog; ac_word=$2
33749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33750$as_echo_n "checking for $ac_word... " >&6; }
33751if ${ac_cv_prog_ac_ct_CC+:} false; then :
33752  $as_echo_n "(cached) " >&6
33753else
33754  if test -n "$ac_ct_CC"; then
33755  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33756else
33757as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33758for as_dir in $PATH
33759do
33760  IFS=$as_save_IFS
33761  test -z "$as_dir" && as_dir=.
33762    for ac_exec_ext in '' $ac_executable_extensions; do
33763  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33764    ac_cv_prog_ac_ct_CC="$ac_prog"
33765    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33766    break 2
33767  fi
33768done
33769  done
33770IFS=$as_save_IFS
33771
33772fi
33773fi
33774ac_ct_CC=$ac_cv_prog_ac_ct_CC
33775if test -n "$ac_ct_CC"; then
33776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33777$as_echo "$ac_ct_CC" >&6; }
33778else
33779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33780$as_echo "no" >&6; }
33781fi
33782
33783
33784  test -n "$ac_ct_CC" && break
33785done
33786
33787  if test "x$ac_ct_CC" = x; then
33788    CC=""
33789  else
33790    case $cross_compiling:$ac_tool_warned in
33791yes:)
33792{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33793$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33794ac_tool_warned=yes ;;
33795esac
33796    CC=$ac_ct_CC
33797  fi
33798fi
33799
33800
33801test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33802$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33803as_fn_error $? "no acceptable C compiler found in \$PATH
33804See \`config.log' for more details" "$LINENO" 5; }
33805
33806# Provide some information about the compiler.
33807$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33808set X $ac_compile
33809ac_compiler=$2
33810for ac_option in --version -v -V -qversion; do
33811  { { ac_try="$ac_compiler $ac_option >&5"
33812case "(($ac_try" in
33813  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33814  *) ac_try_echo=$ac_try;;
33815esac
33816eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33817$as_echo "$ac_try_echo"; } >&5
33818  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33819  ac_status=$?
33820  if test -s conftest.err; then
33821    sed '10a\
33822... rest of stderr output deleted ...
33823         10q' conftest.err >conftest.er1
33824    cat conftest.er1 >&5
33825  fi
33826  rm -f conftest.er1 conftest.err
33827  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33828  test $ac_status = 0; }
33829done
33830
33831cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33832/* end confdefs.h.  */
33833
33834int
33835main ()
33836{
33837
33838  ;
33839  return 0;
33840}
33841_ACEOF
33842ac_clean_files_save=$ac_clean_files
33843ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33844# Try to create an executable without -o first, disregard a.out.
33845# It will help us diagnose broken compilers, and finding out an intuition
33846# of exeext.
33847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33848$as_echo_n "checking whether the C compiler works... " >&6; }
33849ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33850
33851# The possible output files:
33852ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33853
33854ac_rmfiles=
33855for ac_file in $ac_files
33856do
33857  case $ac_file in
33858    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33859    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33860  esac
33861done
33862rm -f $ac_rmfiles
33863
33864if { { ac_try="$ac_link_default"
33865case "(($ac_try" in
33866  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33867  *) ac_try_echo=$ac_try;;
33868esac
33869eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33870$as_echo "$ac_try_echo"; } >&5
33871  (eval "$ac_link_default") 2>&5
33872  ac_status=$?
33873  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33874  test $ac_status = 0; }; then :
33875  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33876# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33877# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33878# so that the user can short-circuit this test for compilers unknown to
33879# Autoconf.
33880for ac_file in $ac_files ''
33881do
33882  test -f "$ac_file" || continue
33883  case $ac_file in
33884    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33885	;;
33886    [ab].out )
33887	# We found the default executable, but exeext='' is most
33888	# certainly right.
33889	break;;
33890    *.* )
33891	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33892	then :; else
33893	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33894	fi
33895	# We set ac_cv_exeext here because the later test for it is not
33896	# safe: cross compilers may not add the suffix if given an `-o'
33897	# argument, so we may need to know it at that point already.
33898	# Even if this section looks crufty: it has the advantage of
33899	# actually working.
33900	break;;
33901    * )
33902	break;;
33903  esac
33904done
33905test "$ac_cv_exeext" = no && ac_cv_exeext=
33906
33907else
33908  ac_file=''
33909fi
33910if test -z "$ac_file"; then :
33911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33912$as_echo "no" >&6; }
33913$as_echo "$as_me: failed program was:" >&5
33914sed 's/^/| /' conftest.$ac_ext >&5
33915
33916{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33917$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33918as_fn_error 77 "C compiler cannot create executables
33919See \`config.log' for more details" "$LINENO" 5; }
33920else
33921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33922$as_echo "yes" >&6; }
33923fi
33924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33925$as_echo_n "checking for C compiler default output file name... " >&6; }
33926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33927$as_echo "$ac_file" >&6; }
33928ac_exeext=$ac_cv_exeext
33929
33930rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33931ac_clean_files=$ac_clean_files_save
33932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33933$as_echo_n "checking for suffix of executables... " >&6; }
33934if { { ac_try="$ac_link"
33935case "(($ac_try" in
33936  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33937  *) ac_try_echo=$ac_try;;
33938esac
33939eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33940$as_echo "$ac_try_echo"; } >&5
33941  (eval "$ac_link") 2>&5
33942  ac_status=$?
33943  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33944  test $ac_status = 0; }; then :
33945  # If both `conftest.exe' and `conftest' are `present' (well, observable)
33946# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33947# work properly (i.e., refer to `conftest.exe'), while it won't with
33948# `rm'.
33949for ac_file in conftest.exe conftest conftest.*; do
33950  test -f "$ac_file" || continue
33951  case $ac_file in
33952    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33953    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33954	  break;;
33955    * ) break;;
33956  esac
33957done
33958else
33959  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33960$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33961as_fn_error $? "cannot compute suffix of executables: cannot compile and link
33962See \`config.log' for more details" "$LINENO" 5; }
33963fi
33964rm -f conftest conftest$ac_cv_exeext
33965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
33966$as_echo "$ac_cv_exeext" >&6; }
33967
33968rm -f conftest.$ac_ext
33969EXEEXT=$ac_cv_exeext
33970ac_exeext=$EXEEXT
33971cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33972/* end confdefs.h.  */
33973#include <stdio.h>
33974int
33975main ()
33976{
33977FILE *f = fopen ("conftest.out", "w");
33978 return ferror (f) || fclose (f) != 0;
33979
33980  ;
33981  return 0;
33982}
33983_ACEOF
33984ac_clean_files="$ac_clean_files conftest.out"
33985# Check that the compiler produces executables we can run.  If not, either
33986# the compiler is broken, or we cross compile.
33987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
33988$as_echo_n "checking whether we are cross compiling... " >&6; }
33989if test "$cross_compiling" != yes; then
33990  { { ac_try="$ac_link"
33991case "(($ac_try" in
33992  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33993  *) ac_try_echo=$ac_try;;
33994esac
33995eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33996$as_echo "$ac_try_echo"; } >&5
33997  (eval "$ac_link") 2>&5
33998  ac_status=$?
33999  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34000  test $ac_status = 0; }
34001  if { ac_try='./conftest$ac_cv_exeext'
34002  { { case "(($ac_try" in
34003  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34004  *) ac_try_echo=$ac_try;;
34005esac
34006eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34007$as_echo "$ac_try_echo"; } >&5
34008  (eval "$ac_try") 2>&5
34009  ac_status=$?
34010  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34011  test $ac_status = 0; }; }; then
34012    cross_compiling=no
34013  else
34014    if test "$cross_compiling" = maybe; then
34015	cross_compiling=yes
34016    else
34017	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34018$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34019as_fn_error $? "cannot run C compiled programs.
34020If you meant to cross compile, use \`--host'.
34021See \`config.log' for more details" "$LINENO" 5; }
34022    fi
34023  fi
34024fi
34025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34026$as_echo "$cross_compiling" >&6; }
34027
34028rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34029ac_clean_files=$ac_clean_files_save
34030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34031$as_echo_n "checking for suffix of object files... " >&6; }
34032if ${ac_cv_objext+:} false; then :
34033  $as_echo_n "(cached) " >&6
34034else
34035  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34036/* end confdefs.h.  */
34037
34038int
34039main ()
34040{
34041
34042  ;
34043  return 0;
34044}
34045_ACEOF
34046rm -f conftest.o conftest.obj
34047if { { ac_try="$ac_compile"
34048case "(($ac_try" in
34049  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34050  *) ac_try_echo=$ac_try;;
34051esac
34052eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34053$as_echo "$ac_try_echo"; } >&5
34054  (eval "$ac_compile") 2>&5
34055  ac_status=$?
34056  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34057  test $ac_status = 0; }; then :
34058  for ac_file in conftest.o conftest.obj conftest.*; do
34059  test -f "$ac_file" || continue;
34060  case $ac_file in
34061    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34062    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34063       break;;
34064  esac
34065done
34066else
34067  $as_echo "$as_me: failed program was:" >&5
34068sed 's/^/| /' conftest.$ac_ext >&5
34069
34070{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34071$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34072as_fn_error $? "cannot compute suffix of object files: cannot compile
34073See \`config.log' for more details" "$LINENO" 5; }
34074fi
34075rm -f conftest.$ac_cv_objext conftest.$ac_ext
34076fi
34077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34078$as_echo "$ac_cv_objext" >&6; }
34079OBJEXT=$ac_cv_objext
34080ac_objext=$OBJEXT
34081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34082$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34083if ${ac_cv_c_compiler_gnu+:} false; then :
34084  $as_echo_n "(cached) " >&6
34085else
34086  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34087/* end confdefs.h.  */
34088
34089int
34090main ()
34091{
34092#ifndef __GNUC__
34093       choke me
34094#endif
34095
34096  ;
34097  return 0;
34098}
34099_ACEOF
34100if ac_fn_c_try_compile "$LINENO"; then :
34101  ac_compiler_gnu=yes
34102else
34103  ac_compiler_gnu=no
34104fi
34105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34106ac_cv_c_compiler_gnu=$ac_compiler_gnu
34107
34108fi
34109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34110$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34111if test $ac_compiler_gnu = yes; then
34112  GCC=yes
34113else
34114  GCC=
34115fi
34116ac_test_CFLAGS=${CFLAGS+set}
34117ac_save_CFLAGS=$CFLAGS
34118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34119$as_echo_n "checking whether $CC accepts -g... " >&6; }
34120if ${ac_cv_prog_cc_g+:} false; then :
34121  $as_echo_n "(cached) " >&6
34122else
34123  ac_save_c_werror_flag=$ac_c_werror_flag
34124   ac_c_werror_flag=yes
34125   ac_cv_prog_cc_g=no
34126   CFLAGS="-g"
34127   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34128/* end confdefs.h.  */
34129
34130int
34131main ()
34132{
34133
34134  ;
34135  return 0;
34136}
34137_ACEOF
34138if ac_fn_c_try_compile "$LINENO"; then :
34139  ac_cv_prog_cc_g=yes
34140else
34141  CFLAGS=""
34142      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34143/* end confdefs.h.  */
34144
34145int
34146main ()
34147{
34148
34149  ;
34150  return 0;
34151}
34152_ACEOF
34153if ac_fn_c_try_compile "$LINENO"; then :
34154
34155else
34156  ac_c_werror_flag=$ac_save_c_werror_flag
34157	 CFLAGS="-g"
34158	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34159/* end confdefs.h.  */
34160
34161int
34162main ()
34163{
34164
34165  ;
34166  return 0;
34167}
34168_ACEOF
34169if ac_fn_c_try_compile "$LINENO"; then :
34170  ac_cv_prog_cc_g=yes
34171fi
34172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34173fi
34174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34175fi
34176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34177   ac_c_werror_flag=$ac_save_c_werror_flag
34178fi
34179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34180$as_echo "$ac_cv_prog_cc_g" >&6; }
34181if test "$ac_test_CFLAGS" = set; then
34182  CFLAGS=$ac_save_CFLAGS
34183elif test $ac_cv_prog_cc_g = yes; then
34184  if test "$GCC" = yes; then
34185    CFLAGS="-g -O2"
34186  else
34187    CFLAGS="-g"
34188  fi
34189else
34190  if test "$GCC" = yes; then
34191    CFLAGS="-O2"
34192  else
34193    CFLAGS=
34194  fi
34195fi
34196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34197$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34198if ${ac_cv_prog_cc_c89+:} false; then :
34199  $as_echo_n "(cached) " >&6
34200else
34201  ac_cv_prog_cc_c89=no
34202ac_save_CC=$CC
34203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34204/* end confdefs.h.  */
34205#include <stdarg.h>
34206#include <stdio.h>
34207struct stat;
34208/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34209struct buf { int x; };
34210FILE * (*rcsopen) (struct buf *, struct stat *, int);
34211static char *e (p, i)
34212     char **p;
34213     int i;
34214{
34215  return p[i];
34216}
34217static char *f (char * (*g) (char **, int), char **p, ...)
34218{
34219  char *s;
34220  va_list v;
34221  va_start (v,p);
34222  s = g (p, va_arg (v,int));
34223  va_end (v);
34224  return s;
34225}
34226
34227/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34228   function prototypes and stuff, but not '\xHH' hex character constants.
34229   These don't provoke an error unfortunately, instead are silently treated
34230   as 'x'.  The following induces an error, until -std is added to get
34231   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34232   array size at least.  It's necessary to write '\x00'==0 to get something
34233   that's true only with -std.  */
34234int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34235
34236/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34237   inside strings and character constants.  */
34238#define FOO(x) 'x'
34239int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34240
34241int test (int i, double x);
34242struct s1 {int (*f) (int a);};
34243struct s2 {int (*f) (double a);};
34244int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34245int argc;
34246char **argv;
34247int
34248main ()
34249{
34250return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34251  ;
34252  return 0;
34253}
34254_ACEOF
34255for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34256	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34257do
34258  CC="$ac_save_CC $ac_arg"
34259  if ac_fn_c_try_compile "$LINENO"; then :
34260  ac_cv_prog_cc_c89=$ac_arg
34261fi
34262rm -f core conftest.err conftest.$ac_objext
34263  test "x$ac_cv_prog_cc_c89" != "xno" && break
34264done
34265rm -f conftest.$ac_ext
34266CC=$ac_save_CC
34267
34268fi
34269# AC_CACHE_VAL
34270case "x$ac_cv_prog_cc_c89" in
34271  x)
34272    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34273$as_echo "none needed" >&6; } ;;
34274  xno)
34275    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34276$as_echo "unsupported" >&6; } ;;
34277  *)
34278    CC="$CC $ac_cv_prog_cc_c89"
34279    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34280$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34281esac
34282if test "x$ac_cv_prog_cc_c89" != xno; then :
34283
34284fi
34285
34286ac_ext=cpp
34287ac_cpp='$CXXCPP $CPPFLAGS'
34288ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34289ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34290ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34291
34292
34293
34294  COMPILER_NAME=C++
34295  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34296
34297  if test "x$CXX" != x; then
34298    # User has supplied compiler name already, always let that override.
34299    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34300$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34301    if test "x`basename $CXX`" = "x$CXX"; then
34302      # A command without a complete path is provided, search $PATH.
34303
34304      for ac_prog in $CXX
34305do
34306  # Extract the first word of "$ac_prog", so it can be a program name with args.
34307set dummy $ac_prog; ac_word=$2
34308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34309$as_echo_n "checking for $ac_word... " >&6; }
34310if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34311  $as_echo_n "(cached) " >&6
34312else
34313  case $POTENTIAL_CXX in
34314  [\\/]* | ?:[\\/]*)
34315  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34316  ;;
34317  *)
34318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34319for as_dir in $PATH
34320do
34321  IFS=$as_save_IFS
34322  test -z "$as_dir" && as_dir=.
34323    for ac_exec_ext in '' $ac_executable_extensions; do
34324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34325    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34327    break 2
34328  fi
34329done
34330  done
34331IFS=$as_save_IFS
34332
34333  ;;
34334esac
34335fi
34336POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34337if test -n "$POTENTIAL_CXX"; then
34338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34339$as_echo "$POTENTIAL_CXX" >&6; }
34340else
34341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34342$as_echo "no" >&6; }
34343fi
34344
34345
34346  test -n "$POTENTIAL_CXX" && break
34347done
34348
34349      if test "x$POTENTIAL_CXX" != x; then
34350        CXX=$POTENTIAL_CXX
34351      else
34352        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34353      fi
34354    else
34355      # Otherwise it might already be a complete path
34356      if test ! -x "$CXX"; then
34357        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34358      fi
34359    fi
34360  else
34361    # No user supplied value. Locate compiler ourselves.
34362
34363    # If we are cross compiling, assume cross compilation tools follows the
34364    # cross compilation standard where they are prefixed with the autoconf
34365    # standard name for the target. For example the binary
34366    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34367    # If we are not cross compiling, then the default compiler name will be
34368    # used.
34369
34370    CXX=
34371    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34372    # before checking the rest of the PATH.
34373    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34374    # step, this should not be necessary.
34375    if test -n "$TOOLCHAIN_PATH"; then
34376      PATH_save="$PATH"
34377      PATH="$TOOLCHAIN_PATH"
34378      for ac_prog in $SEARCH_LIST
34379do
34380  # Extract the first word of "$ac_prog", so it can be a program name with args.
34381set dummy $ac_prog; ac_word=$2
34382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34383$as_echo_n "checking for $ac_word... " >&6; }
34384if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34385  $as_echo_n "(cached) " >&6
34386else
34387  case $TOOLCHAIN_PATH_CXX in
34388  [\\/]* | ?:[\\/]*)
34389  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34390  ;;
34391  *)
34392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34393for as_dir in $PATH
34394do
34395  IFS=$as_save_IFS
34396  test -z "$as_dir" && as_dir=.
34397    for ac_exec_ext in '' $ac_executable_extensions; do
34398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34399    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34401    break 2
34402  fi
34403done
34404  done
34405IFS=$as_save_IFS
34406
34407  ;;
34408esac
34409fi
34410TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34411if test -n "$TOOLCHAIN_PATH_CXX"; then
34412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34413$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34414else
34415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34416$as_echo "no" >&6; }
34417fi
34418
34419
34420  test -n "$TOOLCHAIN_PATH_CXX" && break
34421done
34422
34423      CXX=$TOOLCHAIN_PATH_CXX
34424      PATH="$PATH_save"
34425    fi
34426
34427    # AC_PATH_PROGS can't be run multiple times with the same variable,
34428    # so create a new name for this run.
34429    if test "x$CXX" = x; then
34430      for ac_prog in $SEARCH_LIST
34431do
34432  # Extract the first word of "$ac_prog", so it can be a program name with args.
34433set dummy $ac_prog; ac_word=$2
34434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34435$as_echo_n "checking for $ac_word... " >&6; }
34436if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34437  $as_echo_n "(cached) " >&6
34438else
34439  case $POTENTIAL_CXX in
34440  [\\/]* | ?:[\\/]*)
34441  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34442  ;;
34443  *)
34444  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34445for as_dir in $PATH
34446do
34447  IFS=$as_save_IFS
34448  test -z "$as_dir" && as_dir=.
34449    for ac_exec_ext in '' $ac_executable_extensions; do
34450  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34451    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34452    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34453    break 2
34454  fi
34455done
34456  done
34457IFS=$as_save_IFS
34458
34459  ;;
34460esac
34461fi
34462POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34463if test -n "$POTENTIAL_CXX"; then
34464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34465$as_echo "$POTENTIAL_CXX" >&6; }
34466else
34467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34468$as_echo "no" >&6; }
34469fi
34470
34471
34472  test -n "$POTENTIAL_CXX" && break
34473done
34474
34475      CXX=$POTENTIAL_CXX
34476    fi
34477
34478    if test "x$CXX" = x; then
34479
34480  # Print a helpful message on how to acquire the necessary build dependency.
34481  # devkit is the help tag: freetype, cups, alsa etc
34482  MISSING_DEPENDENCY=devkit
34483
34484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34485    cygwin_help $MISSING_DEPENDENCY
34486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34487    msys_help $MISSING_DEPENDENCY
34488  else
34489    PKGHANDLER_COMMAND=
34490
34491    case $PKGHANDLER in
34492      apt-get)
34493        apt_help     $MISSING_DEPENDENCY ;;
34494      yum)
34495        yum_help     $MISSING_DEPENDENCY ;;
34496      port)
34497        port_help    $MISSING_DEPENDENCY ;;
34498      pkgutil)
34499        pkgutil_help $MISSING_DEPENDENCY ;;
34500      pkgadd)
34501        pkgadd_help  $MISSING_DEPENDENCY ;;
34502    esac
34503
34504    if test "x$PKGHANDLER_COMMAND" != x; then
34505      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34506    fi
34507  fi
34508
34509      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34510    fi
34511  fi
34512
34513  # Now we have a compiler binary in CXX. Make sure it's okay.
34514
34515  # Only process if variable expands to non-empty
34516
34517  if test "x$CXX" != x; then
34518    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34519
34520  # First separate the path from the arguments. This will split at the first
34521  # space.
34522  complete="$CXX"
34523  path="${complete%% *}"
34524  tmp="$complete EOL"
34525  arguments="${tmp#* }"
34526
34527  # Input might be given as Windows format, start by converting to
34528  # unix format.
34529  new_path=`$CYGPATH -u "$path"`
34530
34531  # Now try to locate executable using which
34532  new_path=`$WHICH "$new_path" 2> /dev/null`
34533  # bat and cmd files are not always considered executable in cygwin causing which
34534  # to not find them
34535  if test "x$new_path" = x \
34536      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34537      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34538    new_path=`$CYGPATH -u "$path"`
34539  fi
34540  if test "x$new_path" = x; then
34541    # Oops. Which didn't find the executable.
34542    # The splitting of arguments from the executable at a space might have been incorrect,
34543    # since paths with space are more likely in Windows. Give it another try with the whole
34544    # argument.
34545    path="$complete"
34546    arguments="EOL"
34547    new_path=`$CYGPATH -u "$path"`
34548    new_path=`$WHICH "$new_path" 2> /dev/null`
34549    # bat and cmd files are not always considered executable in cygwin causing which
34550    # to not find them
34551    if test "x$new_path" = x \
34552        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34553        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34554      new_path=`$CYGPATH -u "$path"`
34555    fi
34556    if test "x$new_path" = x; then
34557      # It's still not found. Now this is an unrecoverable error.
34558      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34559$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34560      has_space=`$ECHO "$complete" | $GREP " "`
34561      if test "x$has_space" != x; then
34562        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34563$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34564      fi
34565      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34566    fi
34567  fi
34568
34569  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34570  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34571  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34572  # "foo.exe" is OK but "foo" is an error.
34573  #
34574  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34575  # It is also a way to make sure we got the proper file name for the real test later on.
34576  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34577  if test "x$test_shortpath" = x; then
34578    # Short path failed, file does not exist as specified.
34579    # Try adding .exe or .cmd
34580    if test -f "${new_path}.exe"; then
34581      input_to_shortpath="${new_path}.exe"
34582    elif test -f "${new_path}.cmd"; then
34583      input_to_shortpath="${new_path}.cmd"
34584    else
34585      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34586$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34587      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34588$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34589      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34590    fi
34591  else
34592    input_to_shortpath="$new_path"
34593  fi
34594
34595  # Call helper function which possibly converts this using DOS-style short mode.
34596  # If so, the updated path is stored in $new_path.
34597  new_path="$input_to_shortpath"
34598
34599  input_path="$input_to_shortpath"
34600  # Check if we need to convert this using DOS-style short mode. If the path
34601  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34602  # take no chances and rewrite it.
34603  # Note: m4 eats our [], so we need to use [ and ] instead.
34604  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34605  if test "x$has_forbidden_chars" != x; then
34606    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34607    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34608    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34609    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34610      # Going to short mode and back again did indeed matter. Since short mode is
34611      # case insensitive, let's make it lowercase to improve readability.
34612      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34613      # Now convert it back to Unix-style (cygpath)
34614      input_path=`$CYGPATH -u "$shortmode_path"`
34615      new_path="$input_path"
34616    fi
34617  fi
34618
34619  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34620  if test "x$test_cygdrive_prefix" = x; then
34621    # As a simple fix, exclude /usr/bin since it's not a real path.
34622    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34623      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34624      # a path prefixed by /cygdrive for fixpath to work.
34625      new_path="$CYGWIN_ROOT_PATH$input_path"
34626    fi
34627  fi
34628
34629  # remove trailing .exe if any
34630  new_path="${new_path/%.exe/}"
34631
34632    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34633
34634  # First separate the path from the arguments. This will split at the first
34635  # space.
34636  complete="$CXX"
34637  path="${complete%% *}"
34638  tmp="$complete EOL"
34639  arguments="${tmp#* }"
34640
34641  # Input might be given as Windows format, start by converting to
34642  # unix format.
34643  new_path="$path"
34644
34645  windows_path="$new_path"
34646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34647    unix_path=`$CYGPATH -u "$windows_path"`
34648    new_path="$unix_path"
34649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34651    new_path="$unix_path"
34652  fi
34653
34654
34655  # Now try to locate executable using which
34656  new_path=`$WHICH "$new_path" 2> /dev/null`
34657
34658  if test "x$new_path" = x; then
34659    # Oops. Which didn't find the executable.
34660    # The splitting of arguments from the executable at a space might have been incorrect,
34661    # since paths with space are more likely in Windows. Give it another try with the whole
34662    # argument.
34663    path="$complete"
34664    arguments="EOL"
34665    new_path="$path"
34666
34667  windows_path="$new_path"
34668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34669    unix_path=`$CYGPATH -u "$windows_path"`
34670    new_path="$unix_path"
34671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34672    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34673    new_path="$unix_path"
34674  fi
34675
34676
34677    new_path=`$WHICH "$new_path" 2> /dev/null`
34678    # bat and cmd files are not always considered executable in MSYS causing which
34679    # to not find them
34680    if test "x$new_path" = x \
34681        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34682        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34683      new_path="$path"
34684
34685  windows_path="$new_path"
34686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34687    unix_path=`$CYGPATH -u "$windows_path"`
34688    new_path="$unix_path"
34689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34690    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34691    new_path="$unix_path"
34692  fi
34693
34694    fi
34695
34696    if test "x$new_path" = x; then
34697      # It's still not found. Now this is an unrecoverable error.
34698      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34699$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34700      has_space=`$ECHO "$complete" | $GREP " "`
34701      if test "x$has_space" != x; then
34702        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34703$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34704      fi
34705      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34706    fi
34707  fi
34708
34709  # Now new_path has a complete unix path to the binary
34710  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34711    # Keep paths in /bin as-is, but remove trailing .exe if any
34712    new_path="${new_path/%.exe/}"
34713    # Do not save /bin paths to all_fixpath_prefixes!
34714  else
34715    # Not in mixed or Windows style, start by that.
34716    new_path=`cmd //c echo $new_path`
34717
34718  input_path="$new_path"
34719  # Check if we need to convert this using DOS-style short mode. If the path
34720  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34721  # take no chances and rewrite it.
34722  # Note: m4 eats our [], so we need to use [ and ] instead.
34723  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34724  if test "x$has_forbidden_chars" != x; then
34725    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34726    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34727  fi
34728
34729    # Output is in $new_path
34730
34731  windows_path="$new_path"
34732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34733    unix_path=`$CYGPATH -u "$windows_path"`
34734    new_path="$unix_path"
34735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34737    new_path="$unix_path"
34738  fi
34739
34740    # remove trailing .exe if any
34741    new_path="${new_path/%.exe/}"
34742
34743    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34744    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34745  fi
34746
34747    else
34748      # We're on a unix platform. Hooray! :)
34749      # First separate the path from the arguments. This will split at the first
34750      # space.
34751      complete="$CXX"
34752      path="${complete%% *}"
34753      tmp="$complete EOL"
34754      arguments="${tmp#* }"
34755
34756      # Cannot rely on the command "which" here since it doesn't always work.
34757      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34758      if test -z "$is_absolute_path"; then
34759        # Path to executable is not absolute. Find it.
34760        IFS_save="$IFS"
34761        IFS=:
34762        for p in $PATH; do
34763          if test -f "$p/$path" && test -x "$p/$path"; then
34764            new_path="$p/$path"
34765            break
34766          fi
34767        done
34768        IFS="$IFS_save"
34769      else
34770        # This is an absolute path, we can use it without further modifications.
34771        new_path="$path"
34772      fi
34773
34774      if test "x$new_path" = x; then
34775        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34776$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34777        has_space=`$ECHO "$complete" | $GREP " "`
34778        if test "x$has_space" != x; then
34779          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34780$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34781        fi
34782        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34783      fi
34784    fi
34785
34786    # Now join together the path and the arguments once again
34787    if test "x$arguments" != xEOL; then
34788      new_complete="$new_path ${arguments% *}"
34789    else
34790      new_complete="$new_path"
34791    fi
34792
34793    if test "x$complete" != "x$new_complete"; then
34794      CXX="$new_complete"
34795      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34796$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34797    fi
34798  fi
34799
34800  TEST_COMPILER="$CXX"
34801
34802  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34803$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34804  SYMLINK_ORIGINAL="$TEST_COMPILER"
34805
34806  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34807    # Follow a chain of symbolic links. Use readlink
34808    # where it exists, else fall back to horribly
34809    # complicated shell code.
34810    if test "x$READLINK_TESTED" != yes; then
34811      # On MacOSX there is a readlink tool with a different
34812      # purpose than the GNU readlink tool. Check the found readlink.
34813      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34814      if test "x$ISGNU" = x; then
34815        # A readlink that we do not know how to use.
34816        # Are there other non-GNU readlinks out there?
34817        READLINK_TESTED=yes
34818        READLINK=
34819      fi
34820    fi
34821
34822    if test "x$READLINK" != x; then
34823      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34824    else
34825      # Save the current directory for restoring afterwards
34826      STARTDIR=$PWD
34827      COUNTER=0
34828      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34829      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34830      cd $sym_link_dir
34831      # Use -P flag to resolve symlinks in directories.
34832      cd `$THEPWDCMD -P`
34833      sym_link_dir=`$THEPWDCMD -P`
34834      # Resolve file symlinks
34835      while test $COUNTER -lt 20; do
34836        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34837        if test "x$ISLINK" == x; then
34838          # This is not a symbolic link! We are done!
34839          break
34840        fi
34841        # Again resolve directory symlinks since the target of the just found
34842        # link could be in a different directory
34843        cd `$DIRNAME $ISLINK`
34844        sym_link_dir=`$THEPWDCMD -P`
34845        sym_link_file=`$BASENAME $ISLINK`
34846        let COUNTER=COUNTER+1
34847      done
34848      cd $STARTDIR
34849      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34850    fi
34851  fi
34852
34853  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34854    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34855$as_echo "no symlink" >&6; }
34856  else
34857    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34858$as_echo "$SYMLINK_ORIGINAL" >&6; }
34859
34860    # We can't handle ccache by gcc wrappers, since we need to know if we're
34861    # using ccache. Instead ccache usage must be controlled by a configure option.
34862    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34863    if test "x$COMPILER_BASENAME" = "xccache"; then
34864      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34865$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34866      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34867    fi
34868  fi
34869
34870
34871  COMPILER=$CXX
34872  COMPILER_NAME=$COMPILER_NAME
34873
34874  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34875    # cc -V output typically looks like
34876    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34877    # or
34878    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
34879    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34880    # Check that this is likely to be the Solaris Studio cc.
34881    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
34882    if test $? -ne 0; then
34883      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34884      { $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
34885$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34886      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34887$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34888      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34889$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34890      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34891    fi
34892    # Remove usage instructions (if present), and
34893    # collapse compiler output into a single line
34894    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34895        $SED -e 's/ *[Uu]sage:.*//'`
34896    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34897        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34898  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34899    # xlc -qversion output typically looks like
34900    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34901    #     Version: 11.01.0000.0015
34902    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34903    # Check that this is likely to be the IBM XL C compiler.
34904    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34905    if test $? -ne 0; then
34906      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34907      { $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
34908$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34909      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34910$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34911      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34912$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34913      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34914    fi
34915    # Collapse compiler output into a single line
34916    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34917    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34918        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34919  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34920    # There is no specific version flag, but all output starts with a version string.
34921    # First line typically looks something like:
34922    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34923    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34924    # Check that this is likely to be Microsoft CL.EXE.
34925    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34926    if test $? -ne 0; then
34927      { $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
34928$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34929      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34930$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34931      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34932    fi
34933    # Collapse compiler output into a single line
34934    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34935    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34936        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34937  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34938    # gcc --version output typically looks like
34939    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34940    #     Copyright (C) 2013 Free Software Foundation, Inc.
34941    #     This is free software; see the source for copying conditions.  There is NO
34942    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34943    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34944    # Check that this is likely to be GCC.
34945    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34946    if test $? -ne 0; then
34947      { $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
34948$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34949      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34950$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34951      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34952    fi
34953    # Remove Copyright and legalese from version string, and
34954    # collapse into a single line
34955    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34956        $SED -e 's/ *Copyright .*//'`
34957    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34958        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34959  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34960    # clang --version output typically looks like
34961    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34962    #    clang version 3.3 (tags/RELEASE_33/final)
34963    # or
34964    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34965    #    Target: x86_64-pc-linux-gnu
34966    #    Thread model: posix
34967    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34968    # Check that this is likely to be clang
34969    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34970    if test $? -ne 0; then
34971      { $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
34972$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34973      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34974$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34975      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34976    fi
34977    # Collapse compiler output into a single line
34978    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34979    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34980        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34981  else
34982      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34983  fi
34984  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34985  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34986  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34987  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34988
34989  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34990$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34991
34992
34993  # Now that we have resolved CXX ourself, let autoconf have its go at it
34994  ac_ext=cpp
34995ac_cpp='$CXXCPP $CPPFLAGS'
34996ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34997ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34998ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34999if test -z "$CXX"; then
35000  if test -n "$CCC"; then
35001    CXX=$CCC
35002  else
35003    if test -n "$ac_tool_prefix"; then
35004  for ac_prog in $CXX
35005  do
35006    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35007set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35009$as_echo_n "checking for $ac_word... " >&6; }
35010if ${ac_cv_prog_CXX+:} false; then :
35011  $as_echo_n "(cached) " >&6
35012else
35013  if test -n "$CXX"; then
35014  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35015else
35016as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35017for as_dir in $PATH
35018do
35019  IFS=$as_save_IFS
35020  test -z "$as_dir" && as_dir=.
35021    for ac_exec_ext in '' $ac_executable_extensions; do
35022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35023    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35025    break 2
35026  fi
35027done
35028  done
35029IFS=$as_save_IFS
35030
35031fi
35032fi
35033CXX=$ac_cv_prog_CXX
35034if test -n "$CXX"; then
35035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35036$as_echo "$CXX" >&6; }
35037else
35038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35039$as_echo "no" >&6; }
35040fi
35041
35042
35043    test -n "$CXX" && break
35044  done
35045fi
35046if test -z "$CXX"; then
35047  ac_ct_CXX=$CXX
35048  for ac_prog in $CXX
35049do
35050  # Extract the first word of "$ac_prog", so it can be a program name with args.
35051set dummy $ac_prog; ac_word=$2
35052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35053$as_echo_n "checking for $ac_word... " >&6; }
35054if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35055  $as_echo_n "(cached) " >&6
35056else
35057  if test -n "$ac_ct_CXX"; then
35058  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35059else
35060as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35061for as_dir in $PATH
35062do
35063  IFS=$as_save_IFS
35064  test -z "$as_dir" && as_dir=.
35065    for ac_exec_ext in '' $ac_executable_extensions; do
35066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35067    ac_cv_prog_ac_ct_CXX="$ac_prog"
35068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35069    break 2
35070  fi
35071done
35072  done
35073IFS=$as_save_IFS
35074
35075fi
35076fi
35077ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35078if test -n "$ac_ct_CXX"; then
35079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35080$as_echo "$ac_ct_CXX" >&6; }
35081else
35082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35083$as_echo "no" >&6; }
35084fi
35085
35086
35087  test -n "$ac_ct_CXX" && break
35088done
35089
35090  if test "x$ac_ct_CXX" = x; then
35091    CXX="g++"
35092  else
35093    case $cross_compiling:$ac_tool_warned in
35094yes:)
35095{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35096$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35097ac_tool_warned=yes ;;
35098esac
35099    CXX=$ac_ct_CXX
35100  fi
35101fi
35102
35103  fi
35104fi
35105# Provide some information about the compiler.
35106$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35107set X $ac_compile
35108ac_compiler=$2
35109for ac_option in --version -v -V -qversion; do
35110  { { ac_try="$ac_compiler $ac_option >&5"
35111case "(($ac_try" in
35112  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35113  *) ac_try_echo=$ac_try;;
35114esac
35115eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35116$as_echo "$ac_try_echo"; } >&5
35117  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35118  ac_status=$?
35119  if test -s conftest.err; then
35120    sed '10a\
35121... rest of stderr output deleted ...
35122         10q' conftest.err >conftest.er1
35123    cat conftest.er1 >&5
35124  fi
35125  rm -f conftest.er1 conftest.err
35126  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35127  test $ac_status = 0; }
35128done
35129
35130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35131$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35132if ${ac_cv_cxx_compiler_gnu+:} false; then :
35133  $as_echo_n "(cached) " >&6
35134else
35135  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35136/* end confdefs.h.  */
35137
35138int
35139main ()
35140{
35141#ifndef __GNUC__
35142       choke me
35143#endif
35144
35145  ;
35146  return 0;
35147}
35148_ACEOF
35149if ac_fn_cxx_try_compile "$LINENO"; then :
35150  ac_compiler_gnu=yes
35151else
35152  ac_compiler_gnu=no
35153fi
35154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35155ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35156
35157fi
35158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35159$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35160if test $ac_compiler_gnu = yes; then
35161  GXX=yes
35162else
35163  GXX=
35164fi
35165ac_test_CXXFLAGS=${CXXFLAGS+set}
35166ac_save_CXXFLAGS=$CXXFLAGS
35167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35168$as_echo_n "checking whether $CXX accepts -g... " >&6; }
35169if ${ac_cv_prog_cxx_g+:} false; then :
35170  $as_echo_n "(cached) " >&6
35171else
35172  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35173   ac_cxx_werror_flag=yes
35174   ac_cv_prog_cxx_g=no
35175   CXXFLAGS="-g"
35176   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35177/* end confdefs.h.  */
35178
35179int
35180main ()
35181{
35182
35183  ;
35184  return 0;
35185}
35186_ACEOF
35187if ac_fn_cxx_try_compile "$LINENO"; then :
35188  ac_cv_prog_cxx_g=yes
35189else
35190  CXXFLAGS=""
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
35204else
35205  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35206	 CXXFLAGS="-g"
35207	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35208/* end confdefs.h.  */
35209
35210int
35211main ()
35212{
35213
35214  ;
35215  return 0;
35216}
35217_ACEOF
35218if ac_fn_cxx_try_compile "$LINENO"; then :
35219  ac_cv_prog_cxx_g=yes
35220fi
35221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35222fi
35223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35224fi
35225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35226   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35227fi
35228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35229$as_echo "$ac_cv_prog_cxx_g" >&6; }
35230if test "$ac_test_CXXFLAGS" = set; then
35231  CXXFLAGS=$ac_save_CXXFLAGS
35232elif test $ac_cv_prog_cxx_g = yes; then
35233  if test "$GXX" = yes; then
35234    CXXFLAGS="-g -O2"
35235  else
35236    CXXFLAGS="-g"
35237  fi
35238else
35239  if test "$GXX" = yes; then
35240    CXXFLAGS="-O2"
35241  else
35242    CXXFLAGS=
35243  fi
35244fi
35245ac_ext=cpp
35246ac_cpp='$CXXCPP $CPPFLAGS'
35247ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35248ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35249ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35250
35251
35252  # This is the compiler version number on the form X.Y[.Z]
35253
35254
35255
35256
35257  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35258    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35259$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35260    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35261$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35262  fi
35263
35264  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35265  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
35266    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
35267$as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35268  fi
35269
35270  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35271    { $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
35272$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35273  fi
35274
35275  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
35276
35277
35278  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
35279
35280
35281
35282
35283
35284
35285
35286
35287
35288
35289
35290
35291
35292
35293
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    # Execute function body
35329
35330  # Need to assign to a variable since m4 is blocked from modifying parts in [].
35331  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
35332
35333  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
35334    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
35335  fi
35336
35337  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
35338    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
35339  fi
35340
35341  # Version comparison method inspired by http://stackoverflow.com/a/24067243
35342  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
35343
35344  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
35345    :
35346
35347  else
35348    :
35349
35350          { $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
35351$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
35352
35353
35354  fi
35355
35356
35357
35358
35359
35360
35361
35362
35363
35364
35365
35366
35367
35368
35369  fi
35370
35371  #
35372  # Setup the preprocessor (CPP and CXXCPP)
35373  #
35374  ac_ext=c
35375ac_cpp='$CPP $CPPFLAGS'
35376ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35377ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35378ac_compiler_gnu=$ac_cv_c_compiler_gnu
35379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35380$as_echo_n "checking how to run the C preprocessor... " >&6; }
35381# On Suns, sometimes $CPP names a directory.
35382if test -n "$CPP" && test -d "$CPP"; then
35383  CPP=
35384fi
35385if test -z "$CPP"; then
35386  if ${ac_cv_prog_CPP+:} false; then :
35387  $as_echo_n "(cached) " >&6
35388else
35389      # Double quotes because CPP needs to be expanded
35390    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35391    do
35392      ac_preproc_ok=false
35393for ac_c_preproc_warn_flag in '' yes
35394do
35395  # Use a header file that comes with gcc, so configuring glibc
35396  # with a fresh cross-compiler works.
35397  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35398  # <limits.h> exists even on freestanding compilers.
35399  # On the NeXT, cc -E runs the code through the compiler's parser,
35400  # not just through cpp. "Syntax error" is here to catch this case.
35401  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35402/* end confdefs.h.  */
35403#ifdef __STDC__
35404# include <limits.h>
35405#else
35406# include <assert.h>
35407#endif
35408		     Syntax error
35409_ACEOF
35410if ac_fn_c_try_cpp "$LINENO"; then :
35411
35412else
35413  # Broken: fails on valid input.
35414continue
35415fi
35416rm -f conftest.err conftest.i conftest.$ac_ext
35417
35418  # OK, works on sane cases.  Now check whether nonexistent headers
35419  # can be detected and how.
35420  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35421/* end confdefs.h.  */
35422#include <ac_nonexistent.h>
35423_ACEOF
35424if ac_fn_c_try_cpp "$LINENO"; then :
35425  # Broken: success on invalid input.
35426continue
35427else
35428  # Passes both tests.
35429ac_preproc_ok=:
35430break
35431fi
35432rm -f conftest.err conftest.i conftest.$ac_ext
35433
35434done
35435# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35436rm -f conftest.i conftest.err conftest.$ac_ext
35437if $ac_preproc_ok; then :
35438  break
35439fi
35440
35441    done
35442    ac_cv_prog_CPP=$CPP
35443
35444fi
35445  CPP=$ac_cv_prog_CPP
35446else
35447  ac_cv_prog_CPP=$CPP
35448fi
35449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35450$as_echo "$CPP" >&6; }
35451ac_preproc_ok=false
35452for ac_c_preproc_warn_flag in '' yes
35453do
35454  # Use a header file that comes with gcc, so configuring glibc
35455  # with a fresh cross-compiler works.
35456  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35457  # <limits.h> exists even on freestanding compilers.
35458  # On the NeXT, cc -E runs the code through the compiler's parser,
35459  # not just through cpp. "Syntax error" is here to catch this case.
35460  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35461/* end confdefs.h.  */
35462#ifdef __STDC__
35463# include <limits.h>
35464#else
35465# include <assert.h>
35466#endif
35467		     Syntax error
35468_ACEOF
35469if ac_fn_c_try_cpp "$LINENO"; then :
35470
35471else
35472  # Broken: fails on valid input.
35473continue
35474fi
35475rm -f conftest.err conftest.i conftest.$ac_ext
35476
35477  # OK, works on sane cases.  Now check whether nonexistent headers
35478  # can be detected and how.
35479  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35480/* end confdefs.h.  */
35481#include <ac_nonexistent.h>
35482_ACEOF
35483if ac_fn_c_try_cpp "$LINENO"; then :
35484  # Broken: success on invalid input.
35485continue
35486else
35487  # Passes both tests.
35488ac_preproc_ok=:
35489break
35490fi
35491rm -f conftest.err conftest.i conftest.$ac_ext
35492
35493done
35494# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35495rm -f conftest.i conftest.err conftest.$ac_ext
35496if $ac_preproc_ok; then :
35497
35498else
35499  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35500$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35501as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35502See \`config.log' for more details" "$LINENO" 5; }
35503fi
35504
35505ac_ext=cpp
35506ac_cpp='$CXXCPP $CPPFLAGS'
35507ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35508ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35509ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35510
35511
35512  # Only process if variable expands to non-empty
35513
35514  if test "x$CPP" != x; then
35515    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35516
35517  # First separate the path from the arguments. This will split at the first
35518  # space.
35519  complete="$CPP"
35520  path="${complete%% *}"
35521  tmp="$complete EOL"
35522  arguments="${tmp#* }"
35523
35524  # Input might be given as Windows format, start by converting to
35525  # unix format.
35526  new_path=`$CYGPATH -u "$path"`
35527
35528  # Now try to locate executable using which
35529  new_path=`$WHICH "$new_path" 2> /dev/null`
35530  # bat and cmd files are not always considered executable in cygwin causing which
35531  # to not find them
35532  if test "x$new_path" = x \
35533      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35534      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35535    new_path=`$CYGPATH -u "$path"`
35536  fi
35537  if test "x$new_path" = x; then
35538    # Oops. Which didn't find the executable.
35539    # The splitting of arguments from the executable at a space might have been incorrect,
35540    # since paths with space are more likely in Windows. Give it another try with the whole
35541    # argument.
35542    path="$complete"
35543    arguments="EOL"
35544    new_path=`$CYGPATH -u "$path"`
35545    new_path=`$WHICH "$new_path" 2> /dev/null`
35546    # bat and cmd files are not always considered executable in cygwin causing which
35547    # to not find them
35548    if test "x$new_path" = x \
35549        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35550        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35551      new_path=`$CYGPATH -u "$path"`
35552    fi
35553    if test "x$new_path" = x; then
35554      # It's still not found. Now this is an unrecoverable error.
35555      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35556$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35557      has_space=`$ECHO "$complete" | $GREP " "`
35558      if test "x$has_space" != x; then
35559        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35560$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35561      fi
35562      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35563    fi
35564  fi
35565
35566  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35567  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35568  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35569  # "foo.exe" is OK but "foo" is an error.
35570  #
35571  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35572  # It is also a way to make sure we got the proper file name for the real test later on.
35573  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35574  if test "x$test_shortpath" = x; then
35575    # Short path failed, file does not exist as specified.
35576    # Try adding .exe or .cmd
35577    if test -f "${new_path}.exe"; then
35578      input_to_shortpath="${new_path}.exe"
35579    elif test -f "${new_path}.cmd"; then
35580      input_to_shortpath="${new_path}.cmd"
35581    else
35582      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35583$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35584      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35585$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35586      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35587    fi
35588  else
35589    input_to_shortpath="$new_path"
35590  fi
35591
35592  # Call helper function which possibly converts this using DOS-style short mode.
35593  # If so, the updated path is stored in $new_path.
35594  new_path="$input_to_shortpath"
35595
35596  input_path="$input_to_shortpath"
35597  # Check if we need to convert this using DOS-style short mode. If the path
35598  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35599  # take no chances and rewrite it.
35600  # Note: m4 eats our [], so we need to use [ and ] instead.
35601  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35602  if test "x$has_forbidden_chars" != x; then
35603    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35604    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35605    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35606    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35607      # Going to short mode and back again did indeed matter. Since short mode is
35608      # case insensitive, let's make it lowercase to improve readability.
35609      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35610      # Now convert it back to Unix-style (cygpath)
35611      input_path=`$CYGPATH -u "$shortmode_path"`
35612      new_path="$input_path"
35613    fi
35614  fi
35615
35616  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35617  if test "x$test_cygdrive_prefix" = x; then
35618    # As a simple fix, exclude /usr/bin since it's not a real path.
35619    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35620      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35621      # a path prefixed by /cygdrive for fixpath to work.
35622      new_path="$CYGWIN_ROOT_PATH$input_path"
35623    fi
35624  fi
35625
35626  # remove trailing .exe if any
35627  new_path="${new_path/%.exe/}"
35628
35629    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35630
35631  # First separate the path from the arguments. This will split at the first
35632  # space.
35633  complete="$CPP"
35634  path="${complete%% *}"
35635  tmp="$complete EOL"
35636  arguments="${tmp#* }"
35637
35638  # Input might be given as Windows format, start by converting to
35639  # unix format.
35640  new_path="$path"
35641
35642  windows_path="$new_path"
35643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35644    unix_path=`$CYGPATH -u "$windows_path"`
35645    new_path="$unix_path"
35646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35648    new_path="$unix_path"
35649  fi
35650
35651
35652  # Now try to locate executable using which
35653  new_path=`$WHICH "$new_path" 2> /dev/null`
35654
35655  if test "x$new_path" = x; then
35656    # Oops. Which didn't find the executable.
35657    # The splitting of arguments from the executable at a space might have been incorrect,
35658    # since paths with space are more likely in Windows. Give it another try with the whole
35659    # argument.
35660    path="$complete"
35661    arguments="EOL"
35662    new_path="$path"
35663
35664  windows_path="$new_path"
35665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35666    unix_path=`$CYGPATH -u "$windows_path"`
35667    new_path="$unix_path"
35668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35670    new_path="$unix_path"
35671  fi
35672
35673
35674    new_path=`$WHICH "$new_path" 2> /dev/null`
35675    # bat and cmd files are not always considered executable in MSYS causing which
35676    # to not find them
35677    if test "x$new_path" = x \
35678        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35679        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35680      new_path="$path"
35681
35682  windows_path="$new_path"
35683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35684    unix_path=`$CYGPATH -u "$windows_path"`
35685    new_path="$unix_path"
35686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35688    new_path="$unix_path"
35689  fi
35690
35691    fi
35692
35693    if test "x$new_path" = x; then
35694      # It's still not found. Now this is an unrecoverable error.
35695      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35696$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35697      has_space=`$ECHO "$complete" | $GREP " "`
35698      if test "x$has_space" != x; then
35699        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35700$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35701      fi
35702      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35703    fi
35704  fi
35705
35706  # Now new_path has a complete unix path to the binary
35707  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35708    # Keep paths in /bin as-is, but remove trailing .exe if any
35709    new_path="${new_path/%.exe/}"
35710    # Do not save /bin paths to all_fixpath_prefixes!
35711  else
35712    # Not in mixed or Windows style, start by that.
35713    new_path=`cmd //c echo $new_path`
35714
35715  input_path="$new_path"
35716  # Check if we need to convert this using DOS-style short mode. If the path
35717  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35718  # take no chances and rewrite it.
35719  # Note: m4 eats our [], so we need to use [ and ] instead.
35720  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35721  if test "x$has_forbidden_chars" != x; then
35722    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35723    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35724  fi
35725
35726    # Output is in $new_path
35727
35728  windows_path="$new_path"
35729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35730    unix_path=`$CYGPATH -u "$windows_path"`
35731    new_path="$unix_path"
35732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35734    new_path="$unix_path"
35735  fi
35736
35737    # remove trailing .exe if any
35738    new_path="${new_path/%.exe/}"
35739
35740    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35741    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35742  fi
35743
35744    else
35745      # We're on a unix platform. Hooray! :)
35746      # First separate the path from the arguments. This will split at the first
35747      # space.
35748      complete="$CPP"
35749      path="${complete%% *}"
35750      tmp="$complete EOL"
35751      arguments="${tmp#* }"
35752
35753      # Cannot rely on the command "which" here since it doesn't always work.
35754      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35755      if test -z "$is_absolute_path"; then
35756        # Path to executable is not absolute. Find it.
35757        IFS_save="$IFS"
35758        IFS=:
35759        for p in $PATH; do
35760          if test -f "$p/$path" && test -x "$p/$path"; then
35761            new_path="$p/$path"
35762            break
35763          fi
35764        done
35765        IFS="$IFS_save"
35766      else
35767        # This is an absolute path, we can use it without further modifications.
35768        new_path="$path"
35769      fi
35770
35771      if test "x$new_path" = x; then
35772        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35773$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35774        has_space=`$ECHO "$complete" | $GREP " "`
35775        if test "x$has_space" != x; then
35776          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35777$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35778        fi
35779        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35780      fi
35781    fi
35782
35783    # Now join together the path and the arguments once again
35784    if test "x$arguments" != xEOL; then
35785      new_complete="$new_path ${arguments% *}"
35786    else
35787      new_complete="$new_path"
35788    fi
35789
35790    if test "x$complete" != "x$new_complete"; then
35791      CPP="$new_complete"
35792      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35793$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35794    fi
35795  fi
35796
35797  ac_ext=cpp
35798ac_cpp='$CXXCPP $CPPFLAGS'
35799ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35800ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35801ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35803$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35804if test -z "$CXXCPP"; then
35805  if ${ac_cv_prog_CXXCPP+:} false; then :
35806  $as_echo_n "(cached) " >&6
35807else
35808      # Double quotes because CXXCPP needs to be expanded
35809    for CXXCPP in "$CXX -E" "/lib/cpp"
35810    do
35811      ac_preproc_ok=false
35812for ac_cxx_preproc_warn_flag in '' yes
35813do
35814  # Use a header file that comes with gcc, so configuring glibc
35815  # with a fresh cross-compiler works.
35816  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35817  # <limits.h> exists even on freestanding compilers.
35818  # On the NeXT, cc -E runs the code through the compiler's parser,
35819  # not just through cpp. "Syntax error" is here to catch this case.
35820  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35821/* end confdefs.h.  */
35822#ifdef __STDC__
35823# include <limits.h>
35824#else
35825# include <assert.h>
35826#endif
35827		     Syntax error
35828_ACEOF
35829if ac_fn_cxx_try_cpp "$LINENO"; then :
35830
35831else
35832  # Broken: fails on valid input.
35833continue
35834fi
35835rm -f conftest.err conftest.i conftest.$ac_ext
35836
35837  # OK, works on sane cases.  Now check whether nonexistent headers
35838  # can be detected and how.
35839  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35840/* end confdefs.h.  */
35841#include <ac_nonexistent.h>
35842_ACEOF
35843if ac_fn_cxx_try_cpp "$LINENO"; then :
35844  # Broken: success on invalid input.
35845continue
35846else
35847  # Passes both tests.
35848ac_preproc_ok=:
35849break
35850fi
35851rm -f conftest.err conftest.i conftest.$ac_ext
35852
35853done
35854# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35855rm -f conftest.i conftest.err conftest.$ac_ext
35856if $ac_preproc_ok; then :
35857  break
35858fi
35859
35860    done
35861    ac_cv_prog_CXXCPP=$CXXCPP
35862
35863fi
35864  CXXCPP=$ac_cv_prog_CXXCPP
35865else
35866  ac_cv_prog_CXXCPP=$CXXCPP
35867fi
35868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35869$as_echo "$CXXCPP" >&6; }
35870ac_preproc_ok=false
35871for ac_cxx_preproc_warn_flag in '' yes
35872do
35873  # Use a header file that comes with gcc, so configuring glibc
35874  # with a fresh cross-compiler works.
35875  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35876  # <limits.h> exists even on freestanding compilers.
35877  # On the NeXT, cc -E runs the code through the compiler's parser,
35878  # not just through cpp. "Syntax error" is here to catch this case.
35879  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35880/* end confdefs.h.  */
35881#ifdef __STDC__
35882# include <limits.h>
35883#else
35884# include <assert.h>
35885#endif
35886		     Syntax error
35887_ACEOF
35888if ac_fn_cxx_try_cpp "$LINENO"; then :
35889
35890else
35891  # Broken: fails on valid input.
35892continue
35893fi
35894rm -f conftest.err conftest.i conftest.$ac_ext
35895
35896  # OK, works on sane cases.  Now check whether nonexistent headers
35897  # can be detected and how.
35898  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35899/* end confdefs.h.  */
35900#include <ac_nonexistent.h>
35901_ACEOF
35902if ac_fn_cxx_try_cpp "$LINENO"; then :
35903  # Broken: success on invalid input.
35904continue
35905else
35906  # Passes both tests.
35907ac_preproc_ok=:
35908break
35909fi
35910rm -f conftest.err conftest.i conftest.$ac_ext
35911
35912done
35913# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35914rm -f conftest.i conftest.err conftest.$ac_ext
35915if $ac_preproc_ok; then :
35916
35917else
35918  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35919$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35920as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35921See \`config.log' for more details" "$LINENO" 5; }
35922fi
35923
35924ac_ext=cpp
35925ac_cpp='$CXXCPP $CPPFLAGS'
35926ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35927ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35928ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35929
35930
35931  # Only process if variable expands to non-empty
35932
35933  if test "x$CXXCPP" != x; then
35934    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35935
35936  # First separate the path from the arguments. This will split at the first
35937  # space.
35938  complete="$CXXCPP"
35939  path="${complete%% *}"
35940  tmp="$complete EOL"
35941  arguments="${tmp#* }"
35942
35943  # Input might be given as Windows format, start by converting to
35944  # unix format.
35945  new_path=`$CYGPATH -u "$path"`
35946
35947  # Now try to locate executable using which
35948  new_path=`$WHICH "$new_path" 2> /dev/null`
35949  # bat and cmd files are not always considered executable in cygwin causing which
35950  # to not find them
35951  if test "x$new_path" = x \
35952      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35953      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35954    new_path=`$CYGPATH -u "$path"`
35955  fi
35956  if test "x$new_path" = x; then
35957    # Oops. Which didn't find the executable.
35958    # The splitting of arguments from the executable at a space might have been incorrect,
35959    # since paths with space are more likely in Windows. Give it another try with the whole
35960    # argument.
35961    path="$complete"
35962    arguments="EOL"
35963    new_path=`$CYGPATH -u "$path"`
35964    new_path=`$WHICH "$new_path" 2> /dev/null`
35965    # bat and cmd files are not always considered executable in cygwin causing which
35966    # to not find them
35967    if test "x$new_path" = x \
35968        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35969        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35970      new_path=`$CYGPATH -u "$path"`
35971    fi
35972    if test "x$new_path" = x; then
35973      # It's still not found. Now this is an unrecoverable error.
35974      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35975$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35976      has_space=`$ECHO "$complete" | $GREP " "`
35977      if test "x$has_space" != x; then
35978        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35979$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35980      fi
35981      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35982    fi
35983  fi
35984
35985  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35986  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35987  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35988  # "foo.exe" is OK but "foo" is an error.
35989  #
35990  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35991  # It is also a way to make sure we got the proper file name for the real test later on.
35992  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35993  if test "x$test_shortpath" = x; then
35994    # Short path failed, file does not exist as specified.
35995    # Try adding .exe or .cmd
35996    if test -f "${new_path}.exe"; then
35997      input_to_shortpath="${new_path}.exe"
35998    elif test -f "${new_path}.cmd"; then
35999      input_to_shortpath="${new_path}.cmd"
36000    else
36001      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36002$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36003      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36004$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36005      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36006    fi
36007  else
36008    input_to_shortpath="$new_path"
36009  fi
36010
36011  # Call helper function which possibly converts this using DOS-style short mode.
36012  # If so, the updated path is stored in $new_path.
36013  new_path="$input_to_shortpath"
36014
36015  input_path="$input_to_shortpath"
36016  # Check if we need to convert this using DOS-style short mode. If the path
36017  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36018  # take no chances and rewrite it.
36019  # Note: m4 eats our [], so we need to use [ and ] instead.
36020  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36021  if test "x$has_forbidden_chars" != x; then
36022    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36023    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36024    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36025    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36026      # Going to short mode and back again did indeed matter. Since short mode is
36027      # case insensitive, let's make it lowercase to improve readability.
36028      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36029      # Now convert it back to Unix-style (cygpath)
36030      input_path=`$CYGPATH -u "$shortmode_path"`
36031      new_path="$input_path"
36032    fi
36033  fi
36034
36035  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36036  if test "x$test_cygdrive_prefix" = x; then
36037    # As a simple fix, exclude /usr/bin since it's not a real path.
36038    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36039      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36040      # a path prefixed by /cygdrive for fixpath to work.
36041      new_path="$CYGWIN_ROOT_PATH$input_path"
36042    fi
36043  fi
36044
36045  # remove trailing .exe if any
36046  new_path="${new_path/%.exe/}"
36047
36048    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36049
36050  # First separate the path from the arguments. This will split at the first
36051  # space.
36052  complete="$CXXCPP"
36053  path="${complete%% *}"
36054  tmp="$complete EOL"
36055  arguments="${tmp#* }"
36056
36057  # Input might be given as Windows format, start by converting to
36058  # unix format.
36059  new_path="$path"
36060
36061  windows_path="$new_path"
36062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36063    unix_path=`$CYGPATH -u "$windows_path"`
36064    new_path="$unix_path"
36065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36067    new_path="$unix_path"
36068  fi
36069
36070
36071  # Now try to locate executable using which
36072  new_path=`$WHICH "$new_path" 2> /dev/null`
36073
36074  if test "x$new_path" = x; then
36075    # Oops. Which didn't find the executable.
36076    # The splitting of arguments from the executable at a space might have been incorrect,
36077    # since paths with space are more likely in Windows. Give it another try with the whole
36078    # argument.
36079    path="$complete"
36080    arguments="EOL"
36081    new_path="$path"
36082
36083  windows_path="$new_path"
36084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36085    unix_path=`$CYGPATH -u "$windows_path"`
36086    new_path="$unix_path"
36087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36089    new_path="$unix_path"
36090  fi
36091
36092
36093    new_path=`$WHICH "$new_path" 2> /dev/null`
36094    # bat and cmd files are not always considered executable in MSYS causing which
36095    # to not find them
36096    if test "x$new_path" = x \
36097        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36098        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36099      new_path="$path"
36100
36101  windows_path="$new_path"
36102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36103    unix_path=`$CYGPATH -u "$windows_path"`
36104    new_path="$unix_path"
36105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36107    new_path="$unix_path"
36108  fi
36109
36110    fi
36111
36112    if test "x$new_path" = x; then
36113      # It's still not found. Now this is an unrecoverable error.
36114      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36115$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36116      has_space=`$ECHO "$complete" | $GREP " "`
36117      if test "x$has_space" != x; then
36118        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36119$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36120      fi
36121      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36122    fi
36123  fi
36124
36125  # Now new_path has a complete unix path to the binary
36126  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36127    # Keep paths in /bin as-is, but remove trailing .exe if any
36128    new_path="${new_path/%.exe/}"
36129    # Do not save /bin paths to all_fixpath_prefixes!
36130  else
36131    # Not in mixed or Windows style, start by that.
36132    new_path=`cmd //c echo $new_path`
36133
36134  input_path="$new_path"
36135  # Check if we need to convert this using DOS-style short mode. If the path
36136  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36137  # take no chances and rewrite it.
36138  # Note: m4 eats our [], so we need to use [ and ] instead.
36139  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36140  if test "x$has_forbidden_chars" != x; then
36141    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36142    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36143  fi
36144
36145    # Output is in $new_path
36146
36147  windows_path="$new_path"
36148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36149    unix_path=`$CYGPATH -u "$windows_path"`
36150    new_path="$unix_path"
36151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36153    new_path="$unix_path"
36154  fi
36155
36156    # remove trailing .exe if any
36157    new_path="${new_path/%.exe/}"
36158
36159    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36160    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36161  fi
36162
36163    else
36164      # We're on a unix platform. Hooray! :)
36165      # First separate the path from the arguments. This will split at the first
36166      # space.
36167      complete="$CXXCPP"
36168      path="${complete%% *}"
36169      tmp="$complete EOL"
36170      arguments="${tmp#* }"
36171
36172      # Cannot rely on the command "which" here since it doesn't always work.
36173      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36174      if test -z "$is_absolute_path"; then
36175        # Path to executable is not absolute. Find it.
36176        IFS_save="$IFS"
36177        IFS=:
36178        for p in $PATH; do
36179          if test -f "$p/$path" && test -x "$p/$path"; then
36180            new_path="$p/$path"
36181            break
36182          fi
36183        done
36184        IFS="$IFS_save"
36185      else
36186        # This is an absolute path, we can use it without further modifications.
36187        new_path="$path"
36188      fi
36189
36190      if test "x$new_path" = x; then
36191        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36192$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36193        has_space=`$ECHO "$complete" | $GREP " "`
36194        if test "x$has_space" != x; then
36195          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36196$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36197        fi
36198        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36199      fi
36200    fi
36201
36202    # Now join together the path and the arguments once again
36203    if test "x$arguments" != xEOL; then
36204      new_complete="$new_path ${arguments% *}"
36205    else
36206      new_complete="$new_path"
36207    fi
36208
36209    if test "x$complete" != "x$new_complete"; then
36210      CXXCPP="$new_complete"
36211      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36212$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36213    fi
36214  fi
36215
36216
36217  #
36218  # Setup the linker (LD)
36219  #
36220  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36221    # In the Microsoft toolchain we have a separate LD command "link".
36222    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36223    # a cygwin program for something completely different.
36224    # Extract the first word of "link", so it can be a program name with args.
36225set dummy link; ac_word=$2
36226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36227$as_echo_n "checking for $ac_word... " >&6; }
36228if ${ac_cv_prog_LD+:} false; then :
36229  $as_echo_n "(cached) " >&6
36230else
36231  if test -n "$LD"; then
36232  ac_cv_prog_LD="$LD" # Let the user override the test.
36233else
36234  ac_prog_rejected=no
36235as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36236for as_dir in $PATH
36237do
36238  IFS=$as_save_IFS
36239  test -z "$as_dir" && as_dir=.
36240    for ac_exec_ext in '' $ac_executable_extensions; do
36241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36242    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36243       ac_prog_rejected=yes
36244       continue
36245     fi
36246    ac_cv_prog_LD="link"
36247    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36248    break 2
36249  fi
36250done
36251  done
36252IFS=$as_save_IFS
36253
36254if test $ac_prog_rejected = yes; then
36255  # We found a bogon in the path, so make sure we never use it.
36256  set dummy $ac_cv_prog_LD
36257  shift
36258  if test $# != 0; then
36259    # We chose a different compiler from the bogus one.
36260    # However, it has the same basename, so the bogon will be chosen
36261    # first if we set LD to just the basename; use the full file name.
36262    shift
36263    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36264  fi
36265fi
36266fi
36267fi
36268LD=$ac_cv_prog_LD
36269if test -n "$LD"; then
36270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36271$as_echo "$LD" >&6; }
36272else
36273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36274$as_echo "no" >&6; }
36275fi
36276
36277
36278
36279  # Only process if variable expands to non-empty
36280
36281  if test "x$LD" != x; then
36282    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36283
36284  # First separate the path from the arguments. This will split at the first
36285  # space.
36286  complete="$LD"
36287  path="${complete%% *}"
36288  tmp="$complete EOL"
36289  arguments="${tmp#* }"
36290
36291  # Input might be given as Windows format, start by converting to
36292  # unix format.
36293  new_path=`$CYGPATH -u "$path"`
36294
36295  # Now try to locate executable using which
36296  new_path=`$WHICH "$new_path" 2> /dev/null`
36297  # bat and cmd files are not always considered executable in cygwin causing which
36298  # to not find them
36299  if test "x$new_path" = x \
36300      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36301      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36302    new_path=`$CYGPATH -u "$path"`
36303  fi
36304  if test "x$new_path" = x; then
36305    # Oops. Which didn't find the executable.
36306    # The splitting of arguments from the executable at a space might have been incorrect,
36307    # since paths with space are more likely in Windows. Give it another try with the whole
36308    # argument.
36309    path="$complete"
36310    arguments="EOL"
36311    new_path=`$CYGPATH -u "$path"`
36312    new_path=`$WHICH "$new_path" 2> /dev/null`
36313    # bat and cmd files are not always considered executable in cygwin causing which
36314    # to not find them
36315    if test "x$new_path" = x \
36316        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36317        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36318      new_path=`$CYGPATH -u "$path"`
36319    fi
36320    if test "x$new_path" = x; then
36321      # It's still not found. Now this is an unrecoverable error.
36322      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36323$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36324      has_space=`$ECHO "$complete" | $GREP " "`
36325      if test "x$has_space" != x; then
36326        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36327$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36328      fi
36329      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36330    fi
36331  fi
36332
36333  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36334  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36335  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36336  # "foo.exe" is OK but "foo" is an error.
36337  #
36338  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36339  # It is also a way to make sure we got the proper file name for the real test later on.
36340  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36341  if test "x$test_shortpath" = x; then
36342    # Short path failed, file does not exist as specified.
36343    # Try adding .exe or .cmd
36344    if test -f "${new_path}.exe"; then
36345      input_to_shortpath="${new_path}.exe"
36346    elif test -f "${new_path}.cmd"; then
36347      input_to_shortpath="${new_path}.cmd"
36348    else
36349      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
36350$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
36351      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36352$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36353      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36354    fi
36355  else
36356    input_to_shortpath="$new_path"
36357  fi
36358
36359  # Call helper function which possibly converts this using DOS-style short mode.
36360  # If so, the updated path is stored in $new_path.
36361  new_path="$input_to_shortpath"
36362
36363  input_path="$input_to_shortpath"
36364  # Check if we need to convert this using DOS-style short mode. If the path
36365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36366  # take no chances and rewrite it.
36367  # Note: m4 eats our [], so we need to use [ and ] instead.
36368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36369  if test "x$has_forbidden_chars" != x; then
36370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36371    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36372    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36373    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36374      # Going to short mode and back again did indeed matter. Since short mode is
36375      # case insensitive, let's make it lowercase to improve readability.
36376      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36377      # Now convert it back to Unix-style (cygpath)
36378      input_path=`$CYGPATH -u "$shortmode_path"`
36379      new_path="$input_path"
36380    fi
36381  fi
36382
36383  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36384  if test "x$test_cygdrive_prefix" = x; then
36385    # As a simple fix, exclude /usr/bin since it's not a real path.
36386    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36387      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36388      # a path prefixed by /cygdrive for fixpath to work.
36389      new_path="$CYGWIN_ROOT_PATH$input_path"
36390    fi
36391  fi
36392
36393  # remove trailing .exe if any
36394  new_path="${new_path/%.exe/}"
36395
36396    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36397
36398  # First separate the path from the arguments. This will split at the first
36399  # space.
36400  complete="$LD"
36401  path="${complete%% *}"
36402  tmp="$complete EOL"
36403  arguments="${tmp#* }"
36404
36405  # Input might be given as Windows format, start by converting to
36406  # unix format.
36407  new_path="$path"
36408
36409  windows_path="$new_path"
36410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36411    unix_path=`$CYGPATH -u "$windows_path"`
36412    new_path="$unix_path"
36413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36415    new_path="$unix_path"
36416  fi
36417
36418
36419  # Now try to locate executable using which
36420  new_path=`$WHICH "$new_path" 2> /dev/null`
36421
36422  if test "x$new_path" = x; then
36423    # Oops. Which didn't find the executable.
36424    # The splitting of arguments from the executable at a space might have been incorrect,
36425    # since paths with space are more likely in Windows. Give it another try with the whole
36426    # argument.
36427    path="$complete"
36428    arguments="EOL"
36429    new_path="$path"
36430
36431  windows_path="$new_path"
36432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36433    unix_path=`$CYGPATH -u "$windows_path"`
36434    new_path="$unix_path"
36435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36436    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36437    new_path="$unix_path"
36438  fi
36439
36440
36441    new_path=`$WHICH "$new_path" 2> /dev/null`
36442    # bat and cmd files are not always considered executable in MSYS causing which
36443    # to not find them
36444    if test "x$new_path" = x \
36445        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36446        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36447      new_path="$path"
36448
36449  windows_path="$new_path"
36450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36451    unix_path=`$CYGPATH -u "$windows_path"`
36452    new_path="$unix_path"
36453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36455    new_path="$unix_path"
36456  fi
36457
36458    fi
36459
36460    if test "x$new_path" = x; then
36461      # It's still not found. Now this is an unrecoverable error.
36462      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36463$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36464      has_space=`$ECHO "$complete" | $GREP " "`
36465      if test "x$has_space" != x; then
36466        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36467$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36468      fi
36469      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36470    fi
36471  fi
36472
36473  # Now new_path has a complete unix path to the binary
36474  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36475    # Keep paths in /bin as-is, but remove trailing .exe if any
36476    new_path="${new_path/%.exe/}"
36477    # Do not save /bin paths to all_fixpath_prefixes!
36478  else
36479    # Not in mixed or Windows style, start by that.
36480    new_path=`cmd //c echo $new_path`
36481
36482  input_path="$new_path"
36483  # Check if we need to convert this using DOS-style short mode. If the path
36484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36485  # take no chances and rewrite it.
36486  # Note: m4 eats our [], so we need to use [ and ] instead.
36487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36488  if test "x$has_forbidden_chars" != x; then
36489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36490    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36491  fi
36492
36493    # Output is in $new_path
36494
36495  windows_path="$new_path"
36496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36497    unix_path=`$CYGPATH -u "$windows_path"`
36498    new_path="$unix_path"
36499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36500    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36501    new_path="$unix_path"
36502  fi
36503
36504    # remove trailing .exe if any
36505    new_path="${new_path/%.exe/}"
36506
36507    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36508    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36509  fi
36510
36511    else
36512      # We're on a unix platform. Hooray! :)
36513      # First separate the path from the arguments. This will split at the first
36514      # space.
36515      complete="$LD"
36516      path="${complete%% *}"
36517      tmp="$complete EOL"
36518      arguments="${tmp#* }"
36519
36520      # Cannot rely on the command "which" here since it doesn't always work.
36521      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36522      if test -z "$is_absolute_path"; then
36523        # Path to executable is not absolute. Find it.
36524        IFS_save="$IFS"
36525        IFS=:
36526        for p in $PATH; do
36527          if test -f "$p/$path" && test -x "$p/$path"; then
36528            new_path="$p/$path"
36529            break
36530          fi
36531        done
36532        IFS="$IFS_save"
36533      else
36534        # This is an absolute path, we can use it without further modifications.
36535        new_path="$path"
36536      fi
36537
36538      if test "x$new_path" = x; then
36539        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36540$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36541        has_space=`$ECHO "$complete" | $GREP " "`
36542        if test "x$has_space" != x; then
36543          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36544$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36545        fi
36546        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36547      fi
36548    fi
36549
36550    # Now join together the path and the arguments once again
36551    if test "x$arguments" != xEOL; then
36552      new_complete="$new_path ${arguments% *}"
36553    else
36554      new_complete="$new_path"
36555    fi
36556
36557    if test "x$complete" != "x$new_complete"; then
36558      LD="$new_complete"
36559      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36560$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36561    fi
36562  fi
36563
36564    # Verify that we indeed succeeded with this trick.
36565    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36566$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36567    "$LD" --version > /dev/null
36568    if test $? -eq 0 ; then
36569      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36570$as_echo "no" >&6; }
36571      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36572    else
36573      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36574$as_echo "yes" >&6; }
36575    fi
36576    LDCXX="$LD"
36577  else
36578    # All other toolchains use the compiler to link.
36579    LD="$CC"
36580    LDCXX="$CXX"
36581  fi
36582
36583  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36584
36585
36586  #
36587  # Setup the assembler (AS)
36588  #
36589  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36590
36591
36592  # Publish this variable in the help.
36593
36594
36595  if [ -z "${AS+x}" ]; then
36596    # The variable is not set by user, try to locate tool using the code snippet
36597    for ac_prog in as
36598do
36599  # Extract the first word of "$ac_prog", so it can be a program name with args.
36600set dummy $ac_prog; ac_word=$2
36601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36602$as_echo_n "checking for $ac_word... " >&6; }
36603if ${ac_cv_path_AS+:} false; then :
36604  $as_echo_n "(cached) " >&6
36605else
36606  case $AS in
36607  [\\/]* | ?:[\\/]*)
36608  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36609  ;;
36610  *)
36611  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36612for as_dir in $PATH
36613do
36614  IFS=$as_save_IFS
36615  test -z "$as_dir" && as_dir=.
36616    for ac_exec_ext in '' $ac_executable_extensions; do
36617  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36618    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36620    break 2
36621  fi
36622done
36623  done
36624IFS=$as_save_IFS
36625
36626  ;;
36627esac
36628fi
36629AS=$ac_cv_path_AS
36630if test -n "$AS"; then
36631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36632$as_echo "$AS" >&6; }
36633else
36634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36635$as_echo "no" >&6; }
36636fi
36637
36638
36639  test -n "$AS" && break
36640done
36641
36642  else
36643    # The variable is set, but is it from the command line or the environment?
36644
36645    # Try to remove the string !AS! from our list.
36646    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36647    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36648      # If it failed, the variable was not from the command line. Ignore it,
36649      # but warn the user (except for BASH, which is always set by the calling BASH).
36650      if test "xAS" != xBASH; then
36651        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36652$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36653      fi
36654      # Try to locate tool using the code snippet
36655      for ac_prog in as
36656do
36657  # Extract the first word of "$ac_prog", so it can be a program name with args.
36658set dummy $ac_prog; ac_word=$2
36659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36660$as_echo_n "checking for $ac_word... " >&6; }
36661if ${ac_cv_path_AS+:} false; then :
36662  $as_echo_n "(cached) " >&6
36663else
36664  case $AS in
36665  [\\/]* | ?:[\\/]*)
36666  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36667  ;;
36668  *)
36669  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36670for as_dir in $PATH
36671do
36672  IFS=$as_save_IFS
36673  test -z "$as_dir" && as_dir=.
36674    for ac_exec_ext in '' $ac_executable_extensions; do
36675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36676    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36678    break 2
36679  fi
36680done
36681  done
36682IFS=$as_save_IFS
36683
36684  ;;
36685esac
36686fi
36687AS=$ac_cv_path_AS
36688if test -n "$AS"; then
36689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36690$as_echo "$AS" >&6; }
36691else
36692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36693$as_echo "no" >&6; }
36694fi
36695
36696
36697  test -n "$AS" && break
36698done
36699
36700    else
36701      # If it succeeded, then it was overridden by the user. We will use it
36702      # for the tool.
36703
36704      # First remove it from the list of overridden variables, so we can test
36705      # for unknown variables in the end.
36706      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36707
36708      # Check if we try to supply an empty value
36709      if test "x$AS" = x; then
36710        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36711$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36712        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36713$as_echo_n "checking for AS... " >&6; }
36714        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36715$as_echo "disabled" >&6; }
36716      else
36717        # Check if the provided tool contains a complete path.
36718        tool_specified="$AS"
36719        tool_basename="${tool_specified##*/}"
36720        if test "x$tool_basename" = "x$tool_specified"; then
36721          # A command without a complete path is provided, search $PATH.
36722          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36723$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36724          # Extract the first word of "$tool_basename", so it can be a program name with args.
36725set dummy $tool_basename; ac_word=$2
36726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36727$as_echo_n "checking for $ac_word... " >&6; }
36728if ${ac_cv_path_AS+:} false; then :
36729  $as_echo_n "(cached) " >&6
36730else
36731  case $AS in
36732  [\\/]* | ?:[\\/]*)
36733  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36734  ;;
36735  *)
36736  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36737for as_dir in $PATH
36738do
36739  IFS=$as_save_IFS
36740  test -z "$as_dir" && as_dir=.
36741    for ac_exec_ext in '' $ac_executable_extensions; do
36742  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36743    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36744    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36745    break 2
36746  fi
36747done
36748  done
36749IFS=$as_save_IFS
36750
36751  ;;
36752esac
36753fi
36754AS=$ac_cv_path_AS
36755if test -n "$AS"; then
36756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36757$as_echo "$AS" >&6; }
36758else
36759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36760$as_echo "no" >&6; }
36761fi
36762
36763
36764          if test "x$AS" = x; then
36765            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36766          fi
36767        else
36768          # Otherwise we believe it is a complete path. Use it as it is.
36769          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36770$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36771          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36772$as_echo_n "checking for AS... " >&6; }
36773          if test ! -x "$tool_specified"; then
36774            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36775$as_echo "not found" >&6; }
36776            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36777          fi
36778          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36779$as_echo "$tool_specified" >&6; }
36780        fi
36781      fi
36782    fi
36783
36784  fi
36785
36786
36787
36788  # Only process if variable expands to non-empty
36789
36790  if test "x$AS" != x; then
36791    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36792
36793  # First separate the path from the arguments. This will split at the first
36794  # space.
36795  complete="$AS"
36796  path="${complete%% *}"
36797  tmp="$complete EOL"
36798  arguments="${tmp#* }"
36799
36800  # Input might be given as Windows format, start by converting to
36801  # unix format.
36802  new_path=`$CYGPATH -u "$path"`
36803
36804  # Now try to locate executable using which
36805  new_path=`$WHICH "$new_path" 2> /dev/null`
36806  # bat and cmd files are not always considered executable in cygwin causing which
36807  # to not find them
36808  if test "x$new_path" = x \
36809      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36810      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36811    new_path=`$CYGPATH -u "$path"`
36812  fi
36813  if test "x$new_path" = x; then
36814    # Oops. Which didn't find the executable.
36815    # The splitting of arguments from the executable at a space might have been incorrect,
36816    # since paths with space are more likely in Windows. Give it another try with the whole
36817    # argument.
36818    path="$complete"
36819    arguments="EOL"
36820    new_path=`$CYGPATH -u "$path"`
36821    new_path=`$WHICH "$new_path" 2> /dev/null`
36822    # bat and cmd files are not always considered executable in cygwin causing which
36823    # to not find them
36824    if test "x$new_path" = x \
36825        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36826        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36827      new_path=`$CYGPATH -u "$path"`
36828    fi
36829    if test "x$new_path" = x; then
36830      # It's still not found. Now this is an unrecoverable error.
36831      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36832$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36833      has_space=`$ECHO "$complete" | $GREP " "`
36834      if test "x$has_space" != x; then
36835        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36836$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36837      fi
36838      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36839    fi
36840  fi
36841
36842  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36843  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36844  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36845  # "foo.exe" is OK but "foo" is an error.
36846  #
36847  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36848  # It is also a way to make sure we got the proper file name for the real test later on.
36849  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36850  if test "x$test_shortpath" = x; then
36851    # Short path failed, file does not exist as specified.
36852    # Try adding .exe or .cmd
36853    if test -f "${new_path}.exe"; then
36854      input_to_shortpath="${new_path}.exe"
36855    elif test -f "${new_path}.cmd"; then
36856      input_to_shortpath="${new_path}.cmd"
36857    else
36858      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36859$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36860      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36861$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36862      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36863    fi
36864  else
36865    input_to_shortpath="$new_path"
36866  fi
36867
36868  # Call helper function which possibly converts this using DOS-style short mode.
36869  # If so, the updated path is stored in $new_path.
36870  new_path="$input_to_shortpath"
36871
36872  input_path="$input_to_shortpath"
36873  # Check if we need to convert this using DOS-style short mode. If the path
36874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36875  # take no chances and rewrite it.
36876  # Note: m4 eats our [], so we need to use [ and ] instead.
36877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36878  if test "x$has_forbidden_chars" != x; then
36879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36880    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36881    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36882    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36883      # Going to short mode and back again did indeed matter. Since short mode is
36884      # case insensitive, let's make it lowercase to improve readability.
36885      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36886      # Now convert it back to Unix-style (cygpath)
36887      input_path=`$CYGPATH -u "$shortmode_path"`
36888      new_path="$input_path"
36889    fi
36890  fi
36891
36892  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36893  if test "x$test_cygdrive_prefix" = x; then
36894    # As a simple fix, exclude /usr/bin since it's not a real path.
36895    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36896      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36897      # a path prefixed by /cygdrive for fixpath to work.
36898      new_path="$CYGWIN_ROOT_PATH$input_path"
36899    fi
36900  fi
36901
36902  # remove trailing .exe if any
36903  new_path="${new_path/%.exe/}"
36904
36905    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36906
36907  # First separate the path from the arguments. This will split at the first
36908  # space.
36909  complete="$AS"
36910  path="${complete%% *}"
36911  tmp="$complete EOL"
36912  arguments="${tmp#* }"
36913
36914  # Input might be given as Windows format, start by converting to
36915  # unix format.
36916  new_path="$path"
36917
36918  windows_path="$new_path"
36919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36920    unix_path=`$CYGPATH -u "$windows_path"`
36921    new_path="$unix_path"
36922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36924    new_path="$unix_path"
36925  fi
36926
36927
36928  # Now try to locate executable using which
36929  new_path=`$WHICH "$new_path" 2> /dev/null`
36930
36931  if test "x$new_path" = x; then
36932    # Oops. Which didn't find the executable.
36933    # The splitting of arguments from the executable at a space might have been incorrect,
36934    # since paths with space are more likely in Windows. Give it another try with the whole
36935    # argument.
36936    path="$complete"
36937    arguments="EOL"
36938    new_path="$path"
36939
36940  windows_path="$new_path"
36941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36942    unix_path=`$CYGPATH -u "$windows_path"`
36943    new_path="$unix_path"
36944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36946    new_path="$unix_path"
36947  fi
36948
36949
36950    new_path=`$WHICH "$new_path" 2> /dev/null`
36951    # bat and cmd files are not always considered executable in MSYS causing which
36952    # to not find them
36953    if test "x$new_path" = x \
36954        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36955        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36956      new_path="$path"
36957
36958  windows_path="$new_path"
36959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36960    unix_path=`$CYGPATH -u "$windows_path"`
36961    new_path="$unix_path"
36962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36964    new_path="$unix_path"
36965  fi
36966
36967    fi
36968
36969    if test "x$new_path" = x; then
36970      # It's still not found. Now this is an unrecoverable error.
36971      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36972$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36973      has_space=`$ECHO "$complete" | $GREP " "`
36974      if test "x$has_space" != x; then
36975        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36976$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36977      fi
36978      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36979    fi
36980  fi
36981
36982  # Now new_path has a complete unix path to the binary
36983  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36984    # Keep paths in /bin as-is, but remove trailing .exe if any
36985    new_path="${new_path/%.exe/}"
36986    # Do not save /bin paths to all_fixpath_prefixes!
36987  else
36988    # Not in mixed or Windows style, start by that.
36989    new_path=`cmd //c echo $new_path`
36990
36991  input_path="$new_path"
36992  # Check if we need to convert this using DOS-style short mode. If the path
36993  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36994  # take no chances and rewrite it.
36995  # Note: m4 eats our [], so we need to use [ and ] instead.
36996  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36997  if test "x$has_forbidden_chars" != x; then
36998    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36999    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37000  fi
37001
37002    # Output is in $new_path
37003
37004  windows_path="$new_path"
37005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37006    unix_path=`$CYGPATH -u "$windows_path"`
37007    new_path="$unix_path"
37008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37009    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37010    new_path="$unix_path"
37011  fi
37012
37013    # remove trailing .exe if any
37014    new_path="${new_path/%.exe/}"
37015
37016    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37017    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37018  fi
37019
37020    else
37021      # We're on a unix platform. Hooray! :)
37022      # First separate the path from the arguments. This will split at the first
37023      # space.
37024      complete="$AS"
37025      path="${complete%% *}"
37026      tmp="$complete EOL"
37027      arguments="${tmp#* }"
37028
37029      # Cannot rely on the command "which" here since it doesn't always work.
37030      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37031      if test -z "$is_absolute_path"; then
37032        # Path to executable is not absolute. Find it.
37033        IFS_save="$IFS"
37034        IFS=:
37035        for p in $PATH; do
37036          if test -f "$p/$path" && test -x "$p/$path"; then
37037            new_path="$p/$path"
37038            break
37039          fi
37040        done
37041        IFS="$IFS_save"
37042      else
37043        # This is an absolute path, we can use it without further modifications.
37044        new_path="$path"
37045      fi
37046
37047      if test "x$new_path" = x; then
37048        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37049$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37050        has_space=`$ECHO "$complete" | $GREP " "`
37051        if test "x$has_space" != x; then
37052          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37053$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37054        fi
37055        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37056      fi
37057    fi
37058
37059    # Now join together the path and the arguments once again
37060    if test "x$arguments" != xEOL; then
37061      new_complete="$new_path ${arguments% *}"
37062    else
37063      new_complete="$new_path"
37064    fi
37065
37066    if test "x$complete" != "x$new_complete"; then
37067      AS="$new_complete"
37068      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37069$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37070    fi
37071  fi
37072
37073    if test "x$AS" = x; then
37074      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37075    fi
37076  else
37077    # FIXME: is this correct for microsoft?
37078    AS="$CC -c"
37079  fi
37080
37081
37082  #
37083  # Setup the archiver (AR)
37084  #
37085  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37086    # The corresponding ar tool is lib.exe (used to create static libraries)
37087    # Extract the first word of "lib", so it can be a program name with args.
37088set dummy lib; ac_word=$2
37089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37090$as_echo_n "checking for $ac_word... " >&6; }
37091if ${ac_cv_prog_AR+:} false; then :
37092  $as_echo_n "(cached) " >&6
37093else
37094  if test -n "$AR"; then
37095  ac_cv_prog_AR="$AR" # Let the user override the test.
37096else
37097as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37098for as_dir in $PATH
37099do
37100  IFS=$as_save_IFS
37101  test -z "$as_dir" && as_dir=.
37102    for ac_exec_ext in '' $ac_executable_extensions; do
37103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37104    ac_cv_prog_AR="lib"
37105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37106    break 2
37107  fi
37108done
37109  done
37110IFS=$as_save_IFS
37111
37112fi
37113fi
37114AR=$ac_cv_prog_AR
37115if test -n "$AR"; then
37116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37117$as_echo "$AR" >&6; }
37118else
37119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37120$as_echo "no" >&6; }
37121fi
37122
37123
37124  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37125
37126
37127  # Publish this variable in the help.
37128
37129
37130  if [ -z "${AR+x}" ]; then
37131    # The variable is not set by user, try to locate tool using the code snippet
37132    if test -n "$ac_tool_prefix"; then
37133  for ac_prog in ar gcc-ar
37134  do
37135    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37136set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37138$as_echo_n "checking for $ac_word... " >&6; }
37139if ${ac_cv_prog_AR+:} false; then :
37140  $as_echo_n "(cached) " >&6
37141else
37142  if test -n "$AR"; then
37143  ac_cv_prog_AR="$AR" # Let the user override the test.
37144else
37145as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37146for as_dir in $PATH
37147do
37148  IFS=$as_save_IFS
37149  test -z "$as_dir" && as_dir=.
37150    for ac_exec_ext in '' $ac_executable_extensions; do
37151  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37152    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37154    break 2
37155  fi
37156done
37157  done
37158IFS=$as_save_IFS
37159
37160fi
37161fi
37162AR=$ac_cv_prog_AR
37163if test -n "$AR"; then
37164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37165$as_echo "$AR" >&6; }
37166else
37167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37168$as_echo "no" >&6; }
37169fi
37170
37171
37172    test -n "$AR" && break
37173  done
37174fi
37175if test -z "$AR"; then
37176  ac_ct_AR=$AR
37177  for ac_prog in ar gcc-ar
37178do
37179  # Extract the first word of "$ac_prog", so it can be a program name with args.
37180set dummy $ac_prog; ac_word=$2
37181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37182$as_echo_n "checking for $ac_word... " >&6; }
37183if ${ac_cv_prog_ac_ct_AR+:} false; then :
37184  $as_echo_n "(cached) " >&6
37185else
37186  if test -n "$ac_ct_AR"; then
37187  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37188else
37189as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37190for as_dir in $PATH
37191do
37192  IFS=$as_save_IFS
37193  test -z "$as_dir" && as_dir=.
37194    for ac_exec_ext in '' $ac_executable_extensions; do
37195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37196    ac_cv_prog_ac_ct_AR="$ac_prog"
37197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37198    break 2
37199  fi
37200done
37201  done
37202IFS=$as_save_IFS
37203
37204fi
37205fi
37206ac_ct_AR=$ac_cv_prog_ac_ct_AR
37207if test -n "$ac_ct_AR"; then
37208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37209$as_echo "$ac_ct_AR" >&6; }
37210else
37211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37212$as_echo "no" >&6; }
37213fi
37214
37215
37216  test -n "$ac_ct_AR" && break
37217done
37218
37219  if test "x$ac_ct_AR" = x; then
37220    AR=""
37221  else
37222    case $cross_compiling:$ac_tool_warned in
37223yes:)
37224{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37225$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37226ac_tool_warned=yes ;;
37227esac
37228    AR=$ac_ct_AR
37229  fi
37230fi
37231
37232  else
37233    # The variable is set, but is it from the command line or the environment?
37234
37235    # Try to remove the string !AR! from our list.
37236    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37237    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37238      # If it failed, the variable was not from the command line. Ignore it,
37239      # but warn the user (except for BASH, which is always set by the calling BASH).
37240      if test "xAR" != xBASH; then
37241        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37242$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37243      fi
37244      # Try to locate tool using the code snippet
37245      if test -n "$ac_tool_prefix"; then
37246  for ac_prog in ar gcc-ar
37247  do
37248    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37249set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37251$as_echo_n "checking for $ac_word... " >&6; }
37252if ${ac_cv_prog_AR+:} false; then :
37253  $as_echo_n "(cached) " >&6
37254else
37255  if test -n "$AR"; then
37256  ac_cv_prog_AR="$AR" # Let the user override the test.
37257else
37258as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37259for as_dir in $PATH
37260do
37261  IFS=$as_save_IFS
37262  test -z "$as_dir" && as_dir=.
37263    for ac_exec_ext in '' $ac_executable_extensions; do
37264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37265    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37267    break 2
37268  fi
37269done
37270  done
37271IFS=$as_save_IFS
37272
37273fi
37274fi
37275AR=$ac_cv_prog_AR
37276if test -n "$AR"; then
37277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37278$as_echo "$AR" >&6; }
37279else
37280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37281$as_echo "no" >&6; }
37282fi
37283
37284
37285    test -n "$AR" && break
37286  done
37287fi
37288if test -z "$AR"; then
37289  ac_ct_AR=$AR
37290  for ac_prog in ar gcc-ar
37291do
37292  # Extract the first word of "$ac_prog", so it can be a program name with args.
37293set dummy $ac_prog; ac_word=$2
37294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37295$as_echo_n "checking for $ac_word... " >&6; }
37296if ${ac_cv_prog_ac_ct_AR+:} false; then :
37297  $as_echo_n "(cached) " >&6
37298else
37299  if test -n "$ac_ct_AR"; then
37300  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37301else
37302as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37303for as_dir in $PATH
37304do
37305  IFS=$as_save_IFS
37306  test -z "$as_dir" && as_dir=.
37307    for ac_exec_ext in '' $ac_executable_extensions; do
37308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37309    ac_cv_prog_ac_ct_AR="$ac_prog"
37310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37311    break 2
37312  fi
37313done
37314  done
37315IFS=$as_save_IFS
37316
37317fi
37318fi
37319ac_ct_AR=$ac_cv_prog_ac_ct_AR
37320if test -n "$ac_ct_AR"; then
37321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37322$as_echo "$ac_ct_AR" >&6; }
37323else
37324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37325$as_echo "no" >&6; }
37326fi
37327
37328
37329  test -n "$ac_ct_AR" && break
37330done
37331
37332  if test "x$ac_ct_AR" = x; then
37333    AR=""
37334  else
37335    case $cross_compiling:$ac_tool_warned in
37336yes:)
37337{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37338$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37339ac_tool_warned=yes ;;
37340esac
37341    AR=$ac_ct_AR
37342  fi
37343fi
37344
37345    else
37346      # If it succeeded, then it was overridden by the user. We will use it
37347      # for the tool.
37348
37349      # First remove it from the list of overridden variables, so we can test
37350      # for unknown variables in the end.
37351      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37352
37353      # Check if we try to supply an empty value
37354      if test "x$AR" = x; then
37355        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37356$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37357        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37358$as_echo_n "checking for AR... " >&6; }
37359        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37360$as_echo "disabled" >&6; }
37361      else
37362        # Check if the provided tool contains a complete path.
37363        tool_specified="$AR"
37364        tool_basename="${tool_specified##*/}"
37365        if test "x$tool_basename" = "x$tool_specified"; then
37366          # A command without a complete path is provided, search $PATH.
37367          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37368$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37369          # Extract the first word of "$tool_basename", so it can be a program name with args.
37370set dummy $tool_basename; ac_word=$2
37371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37372$as_echo_n "checking for $ac_word... " >&6; }
37373if ${ac_cv_path_AR+:} false; then :
37374  $as_echo_n "(cached) " >&6
37375else
37376  case $AR in
37377  [\\/]* | ?:[\\/]*)
37378  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37379  ;;
37380  *)
37381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37382for as_dir in $PATH
37383do
37384  IFS=$as_save_IFS
37385  test -z "$as_dir" && as_dir=.
37386    for ac_exec_ext in '' $ac_executable_extensions; do
37387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37388    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37390    break 2
37391  fi
37392done
37393  done
37394IFS=$as_save_IFS
37395
37396  ;;
37397esac
37398fi
37399AR=$ac_cv_path_AR
37400if test -n "$AR"; then
37401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37402$as_echo "$AR" >&6; }
37403else
37404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37405$as_echo "no" >&6; }
37406fi
37407
37408
37409          if test "x$AR" = x; then
37410            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37411          fi
37412        else
37413          # Otherwise we believe it is a complete path. Use it as it is.
37414          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37415$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37416          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37417$as_echo_n "checking for AR... " >&6; }
37418          if test ! -x "$tool_specified"; then
37419            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37420$as_echo "not found" >&6; }
37421            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37422          fi
37423          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37424$as_echo "$tool_specified" >&6; }
37425        fi
37426      fi
37427    fi
37428
37429  fi
37430
37431
37432  else
37433
37434
37435  # Publish this variable in the help.
37436
37437
37438  if [ -z "${AR+x}" ]; then
37439    # The variable is not set by user, try to locate tool using the code snippet
37440    if test -n "$ac_tool_prefix"; then
37441  for ac_prog in ar
37442  do
37443    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37444set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37446$as_echo_n "checking for $ac_word... " >&6; }
37447if ${ac_cv_prog_AR+:} false; then :
37448  $as_echo_n "(cached) " >&6
37449else
37450  if test -n "$AR"; then
37451  ac_cv_prog_AR="$AR" # Let the user override the test.
37452else
37453as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37454for as_dir in $PATH
37455do
37456  IFS=$as_save_IFS
37457  test -z "$as_dir" && as_dir=.
37458    for ac_exec_ext in '' $ac_executable_extensions; do
37459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37460    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37462    break 2
37463  fi
37464done
37465  done
37466IFS=$as_save_IFS
37467
37468fi
37469fi
37470AR=$ac_cv_prog_AR
37471if test -n "$AR"; then
37472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37473$as_echo "$AR" >&6; }
37474else
37475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37476$as_echo "no" >&6; }
37477fi
37478
37479
37480    test -n "$AR" && break
37481  done
37482fi
37483if test -z "$AR"; then
37484  ac_ct_AR=$AR
37485  for ac_prog in ar
37486do
37487  # Extract the first word of "$ac_prog", so it can be a program name with args.
37488set dummy $ac_prog; ac_word=$2
37489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37490$as_echo_n "checking for $ac_word... " >&6; }
37491if ${ac_cv_prog_ac_ct_AR+:} false; then :
37492  $as_echo_n "(cached) " >&6
37493else
37494  if test -n "$ac_ct_AR"; then
37495  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37496else
37497as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37498for as_dir in $PATH
37499do
37500  IFS=$as_save_IFS
37501  test -z "$as_dir" && as_dir=.
37502    for ac_exec_ext in '' $ac_executable_extensions; do
37503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37504    ac_cv_prog_ac_ct_AR="$ac_prog"
37505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37506    break 2
37507  fi
37508done
37509  done
37510IFS=$as_save_IFS
37511
37512fi
37513fi
37514ac_ct_AR=$ac_cv_prog_ac_ct_AR
37515if test -n "$ac_ct_AR"; then
37516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37517$as_echo "$ac_ct_AR" >&6; }
37518else
37519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37520$as_echo "no" >&6; }
37521fi
37522
37523
37524  test -n "$ac_ct_AR" && break
37525done
37526
37527  if test "x$ac_ct_AR" = x; then
37528    AR=""
37529  else
37530    case $cross_compiling:$ac_tool_warned in
37531yes:)
37532{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37533$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37534ac_tool_warned=yes ;;
37535esac
37536    AR=$ac_ct_AR
37537  fi
37538fi
37539
37540  else
37541    # The variable is set, but is it from the command line or the environment?
37542
37543    # Try to remove the string !AR! from our list.
37544    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37545    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37546      # If it failed, the variable was not from the command line. Ignore it,
37547      # but warn the user (except for BASH, which is always set by the calling BASH).
37548      if test "xAR" != xBASH; then
37549        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37550$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37551      fi
37552      # Try to locate tool using the code snippet
37553      if test -n "$ac_tool_prefix"; then
37554  for ac_prog in ar
37555  do
37556    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37557set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37559$as_echo_n "checking for $ac_word... " >&6; }
37560if ${ac_cv_prog_AR+:} false; then :
37561  $as_echo_n "(cached) " >&6
37562else
37563  if test -n "$AR"; then
37564  ac_cv_prog_AR="$AR" # Let the user override the test.
37565else
37566as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37567for as_dir in $PATH
37568do
37569  IFS=$as_save_IFS
37570  test -z "$as_dir" && as_dir=.
37571    for ac_exec_ext in '' $ac_executable_extensions; do
37572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37573    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37575    break 2
37576  fi
37577done
37578  done
37579IFS=$as_save_IFS
37580
37581fi
37582fi
37583AR=$ac_cv_prog_AR
37584if test -n "$AR"; then
37585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37586$as_echo "$AR" >&6; }
37587else
37588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37589$as_echo "no" >&6; }
37590fi
37591
37592
37593    test -n "$AR" && break
37594  done
37595fi
37596if test -z "$AR"; then
37597  ac_ct_AR=$AR
37598  for ac_prog in ar
37599do
37600  # Extract the first word of "$ac_prog", so it can be a program name with args.
37601set dummy $ac_prog; ac_word=$2
37602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37603$as_echo_n "checking for $ac_word... " >&6; }
37604if ${ac_cv_prog_ac_ct_AR+:} false; then :
37605  $as_echo_n "(cached) " >&6
37606else
37607  if test -n "$ac_ct_AR"; then
37608  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37609else
37610as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37611for as_dir in $PATH
37612do
37613  IFS=$as_save_IFS
37614  test -z "$as_dir" && as_dir=.
37615    for ac_exec_ext in '' $ac_executable_extensions; do
37616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37617    ac_cv_prog_ac_ct_AR="$ac_prog"
37618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37619    break 2
37620  fi
37621done
37622  done
37623IFS=$as_save_IFS
37624
37625fi
37626fi
37627ac_ct_AR=$ac_cv_prog_ac_ct_AR
37628if test -n "$ac_ct_AR"; then
37629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37630$as_echo "$ac_ct_AR" >&6; }
37631else
37632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37633$as_echo "no" >&6; }
37634fi
37635
37636
37637  test -n "$ac_ct_AR" && break
37638done
37639
37640  if test "x$ac_ct_AR" = x; then
37641    AR=""
37642  else
37643    case $cross_compiling:$ac_tool_warned in
37644yes:)
37645{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37646$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37647ac_tool_warned=yes ;;
37648esac
37649    AR=$ac_ct_AR
37650  fi
37651fi
37652
37653    else
37654      # If it succeeded, then it was overridden by the user. We will use it
37655      # for the tool.
37656
37657      # First remove it from the list of overridden variables, so we can test
37658      # for unknown variables in the end.
37659      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37660
37661      # Check if we try to supply an empty value
37662      if test "x$AR" = x; then
37663        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37664$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37665        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37666$as_echo_n "checking for AR... " >&6; }
37667        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37668$as_echo "disabled" >&6; }
37669      else
37670        # Check if the provided tool contains a complete path.
37671        tool_specified="$AR"
37672        tool_basename="${tool_specified##*/}"
37673        if test "x$tool_basename" = "x$tool_specified"; then
37674          # A command without a complete path is provided, search $PATH.
37675          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37676$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37677          # Extract the first word of "$tool_basename", so it can be a program name with args.
37678set dummy $tool_basename; ac_word=$2
37679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37680$as_echo_n "checking for $ac_word... " >&6; }
37681if ${ac_cv_path_AR+:} false; then :
37682  $as_echo_n "(cached) " >&6
37683else
37684  case $AR in
37685  [\\/]* | ?:[\\/]*)
37686  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37687  ;;
37688  *)
37689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37690for as_dir in $PATH
37691do
37692  IFS=$as_save_IFS
37693  test -z "$as_dir" && as_dir=.
37694    for ac_exec_ext in '' $ac_executable_extensions; do
37695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37696    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37698    break 2
37699  fi
37700done
37701  done
37702IFS=$as_save_IFS
37703
37704  ;;
37705esac
37706fi
37707AR=$ac_cv_path_AR
37708if test -n "$AR"; then
37709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37710$as_echo "$AR" >&6; }
37711else
37712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37713$as_echo "no" >&6; }
37714fi
37715
37716
37717          if test "x$AR" = x; then
37718            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37719          fi
37720        else
37721          # Otherwise we believe it is a complete path. Use it as it is.
37722          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37723$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37724          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37725$as_echo_n "checking for AR... " >&6; }
37726          if test ! -x "$tool_specified"; then
37727            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37728$as_echo "not found" >&6; }
37729            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37730          fi
37731          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37732$as_echo "$tool_specified" >&6; }
37733        fi
37734      fi
37735    fi
37736
37737  fi
37738
37739
37740  fi
37741
37742  # Only process if variable expands to non-empty
37743
37744  if test "x$AR" != x; then
37745    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37746
37747  # First separate the path from the arguments. This will split at the first
37748  # space.
37749  complete="$AR"
37750  path="${complete%% *}"
37751  tmp="$complete EOL"
37752  arguments="${tmp#* }"
37753
37754  # Input might be given as Windows format, start by converting to
37755  # unix format.
37756  new_path=`$CYGPATH -u "$path"`
37757
37758  # Now try to locate executable using which
37759  new_path=`$WHICH "$new_path" 2> /dev/null`
37760  # bat and cmd files are not always considered executable in cygwin causing which
37761  # to not find them
37762  if test "x$new_path" = x \
37763      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37764      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37765    new_path=`$CYGPATH -u "$path"`
37766  fi
37767  if test "x$new_path" = x; then
37768    # Oops. Which didn't find the executable.
37769    # The splitting of arguments from the executable at a space might have been incorrect,
37770    # since paths with space are more likely in Windows. Give it another try with the whole
37771    # argument.
37772    path="$complete"
37773    arguments="EOL"
37774    new_path=`$CYGPATH -u "$path"`
37775    new_path=`$WHICH "$new_path" 2> /dev/null`
37776    # bat and cmd files are not always considered executable in cygwin causing which
37777    # to not find them
37778    if test "x$new_path" = x \
37779        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37780        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37781      new_path=`$CYGPATH -u "$path"`
37782    fi
37783    if test "x$new_path" = x; then
37784      # It's still not found. Now this is an unrecoverable error.
37785      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37786$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37787      has_space=`$ECHO "$complete" | $GREP " "`
37788      if test "x$has_space" != x; then
37789        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37790$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37791      fi
37792      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37793    fi
37794  fi
37795
37796  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37797  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37798  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37799  # "foo.exe" is OK but "foo" is an error.
37800  #
37801  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37802  # It is also a way to make sure we got the proper file name for the real test later on.
37803  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37804  if test "x$test_shortpath" = x; then
37805    # Short path failed, file does not exist as specified.
37806    # Try adding .exe or .cmd
37807    if test -f "${new_path}.exe"; then
37808      input_to_shortpath="${new_path}.exe"
37809    elif test -f "${new_path}.cmd"; then
37810      input_to_shortpath="${new_path}.cmd"
37811    else
37812      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37813$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37814      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37815$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37816      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37817    fi
37818  else
37819    input_to_shortpath="$new_path"
37820  fi
37821
37822  # Call helper function which possibly converts this using DOS-style short mode.
37823  # If so, the updated path is stored in $new_path.
37824  new_path="$input_to_shortpath"
37825
37826  input_path="$input_to_shortpath"
37827  # Check if we need to convert this using DOS-style short mode. If the path
37828  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37829  # take no chances and rewrite it.
37830  # Note: m4 eats our [], so we need to use [ and ] instead.
37831  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37832  if test "x$has_forbidden_chars" != x; then
37833    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37834    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37835    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37836    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37837      # Going to short mode and back again did indeed matter. Since short mode is
37838      # case insensitive, let's make it lowercase to improve readability.
37839      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37840      # Now convert it back to Unix-style (cygpath)
37841      input_path=`$CYGPATH -u "$shortmode_path"`
37842      new_path="$input_path"
37843    fi
37844  fi
37845
37846  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37847  if test "x$test_cygdrive_prefix" = x; then
37848    # As a simple fix, exclude /usr/bin since it's not a real path.
37849    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37850      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37851      # a path prefixed by /cygdrive for fixpath to work.
37852      new_path="$CYGWIN_ROOT_PATH$input_path"
37853    fi
37854  fi
37855
37856  # remove trailing .exe if any
37857  new_path="${new_path/%.exe/}"
37858
37859    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37860
37861  # First separate the path from the arguments. This will split at the first
37862  # space.
37863  complete="$AR"
37864  path="${complete%% *}"
37865  tmp="$complete EOL"
37866  arguments="${tmp#* }"
37867
37868  # Input might be given as Windows format, start by converting to
37869  # unix format.
37870  new_path="$path"
37871
37872  windows_path="$new_path"
37873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37874    unix_path=`$CYGPATH -u "$windows_path"`
37875    new_path="$unix_path"
37876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37878    new_path="$unix_path"
37879  fi
37880
37881
37882  # Now try to locate executable using which
37883  new_path=`$WHICH "$new_path" 2> /dev/null`
37884
37885  if test "x$new_path" = x; then
37886    # Oops. Which didn't find the executable.
37887    # The splitting of arguments from the executable at a space might have been incorrect,
37888    # since paths with space are more likely in Windows. Give it another try with the whole
37889    # argument.
37890    path="$complete"
37891    arguments="EOL"
37892    new_path="$path"
37893
37894  windows_path="$new_path"
37895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37896    unix_path=`$CYGPATH -u "$windows_path"`
37897    new_path="$unix_path"
37898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37900    new_path="$unix_path"
37901  fi
37902
37903
37904    new_path=`$WHICH "$new_path" 2> /dev/null`
37905    # bat and cmd files are not always considered executable in MSYS causing which
37906    # to not find them
37907    if test "x$new_path" = x \
37908        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37909        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37910      new_path="$path"
37911
37912  windows_path="$new_path"
37913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37914    unix_path=`$CYGPATH -u "$windows_path"`
37915    new_path="$unix_path"
37916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37917    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37918    new_path="$unix_path"
37919  fi
37920
37921    fi
37922
37923    if test "x$new_path" = x; then
37924      # It's still not found. Now this is an unrecoverable error.
37925      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37926$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37927      has_space=`$ECHO "$complete" | $GREP " "`
37928      if test "x$has_space" != x; then
37929        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37930$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37931      fi
37932      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37933    fi
37934  fi
37935
37936  # Now new_path has a complete unix path to the binary
37937  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37938    # Keep paths in /bin as-is, but remove trailing .exe if any
37939    new_path="${new_path/%.exe/}"
37940    # Do not save /bin paths to all_fixpath_prefixes!
37941  else
37942    # Not in mixed or Windows style, start by that.
37943    new_path=`cmd //c echo $new_path`
37944
37945  input_path="$new_path"
37946  # Check if we need to convert this using DOS-style short mode. If the path
37947  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37948  # take no chances and rewrite it.
37949  # Note: m4 eats our [], so we need to use [ and ] instead.
37950  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37951  if test "x$has_forbidden_chars" != x; then
37952    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37953    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37954  fi
37955
37956    # Output is in $new_path
37957
37958  windows_path="$new_path"
37959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37960    unix_path=`$CYGPATH -u "$windows_path"`
37961    new_path="$unix_path"
37962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37964    new_path="$unix_path"
37965  fi
37966
37967    # remove trailing .exe if any
37968    new_path="${new_path/%.exe/}"
37969
37970    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37971    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37972  fi
37973
37974    else
37975      # We're on a unix platform. Hooray! :)
37976      # First separate the path from the arguments. This will split at the first
37977      # space.
37978      complete="$AR"
37979      path="${complete%% *}"
37980      tmp="$complete EOL"
37981      arguments="${tmp#* }"
37982
37983      # Cannot rely on the command "which" here since it doesn't always work.
37984      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37985      if test -z "$is_absolute_path"; then
37986        # Path to executable is not absolute. Find it.
37987        IFS_save="$IFS"
37988        IFS=:
37989        for p in $PATH; do
37990          if test -f "$p/$path" && test -x "$p/$path"; then
37991            new_path="$p/$path"
37992            break
37993          fi
37994        done
37995        IFS="$IFS_save"
37996      else
37997        # This is an absolute path, we can use it without further modifications.
37998        new_path="$path"
37999      fi
38000
38001      if test "x$new_path" = x; then
38002        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38003$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38004        has_space=`$ECHO "$complete" | $GREP " "`
38005        if test "x$has_space" != x; then
38006          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38007$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38008        fi
38009        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38010      fi
38011    fi
38012
38013    # Now join together the path and the arguments once again
38014    if test "x$arguments" != xEOL; then
38015      new_complete="$new_path ${arguments% *}"
38016    else
38017      new_complete="$new_path"
38018    fi
38019
38020    if test "x$complete" != "x$new_complete"; then
38021      AR="$new_complete"
38022      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38023$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38024    fi
38025  fi
38026
38027
38028
38029  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38030
38031
38032  # Publish this variable in the help.
38033
38034
38035  if [ -z "${LIPO+x}" ]; then
38036    # The variable is not set by user, try to locate tool using the code snippet
38037    for ac_prog in lipo
38038do
38039  # Extract the first word of "$ac_prog", so it can be a program name with args.
38040set dummy $ac_prog; ac_word=$2
38041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38042$as_echo_n "checking for $ac_word... " >&6; }
38043if ${ac_cv_path_LIPO+:} false; then :
38044  $as_echo_n "(cached) " >&6
38045else
38046  case $LIPO in
38047  [\\/]* | ?:[\\/]*)
38048  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38049  ;;
38050  *)
38051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38052for as_dir in $PATH
38053do
38054  IFS=$as_save_IFS
38055  test -z "$as_dir" && as_dir=.
38056    for ac_exec_ext in '' $ac_executable_extensions; do
38057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38058    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38060    break 2
38061  fi
38062done
38063  done
38064IFS=$as_save_IFS
38065
38066  ;;
38067esac
38068fi
38069LIPO=$ac_cv_path_LIPO
38070if test -n "$LIPO"; then
38071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38072$as_echo "$LIPO" >&6; }
38073else
38074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38075$as_echo "no" >&6; }
38076fi
38077
38078
38079  test -n "$LIPO" && break
38080done
38081
38082  else
38083    # The variable is set, but is it from the command line or the environment?
38084
38085    # Try to remove the string !LIPO! from our list.
38086    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38087    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38088      # If it failed, the variable was not from the command line. Ignore it,
38089      # but warn the user (except for BASH, which is always set by the calling BASH).
38090      if test "xLIPO" != xBASH; then
38091        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38092$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38093      fi
38094      # Try to locate tool using the code snippet
38095      for ac_prog in lipo
38096do
38097  # Extract the first word of "$ac_prog", so it can be a program name with args.
38098set dummy $ac_prog; ac_word=$2
38099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38100$as_echo_n "checking for $ac_word... " >&6; }
38101if ${ac_cv_path_LIPO+:} false; then :
38102  $as_echo_n "(cached) " >&6
38103else
38104  case $LIPO in
38105  [\\/]* | ?:[\\/]*)
38106  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38107  ;;
38108  *)
38109  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38110for as_dir in $PATH
38111do
38112  IFS=$as_save_IFS
38113  test -z "$as_dir" && as_dir=.
38114    for ac_exec_ext in '' $ac_executable_extensions; do
38115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38116    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38118    break 2
38119  fi
38120done
38121  done
38122IFS=$as_save_IFS
38123
38124  ;;
38125esac
38126fi
38127LIPO=$ac_cv_path_LIPO
38128if test -n "$LIPO"; then
38129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38130$as_echo "$LIPO" >&6; }
38131else
38132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38133$as_echo "no" >&6; }
38134fi
38135
38136
38137  test -n "$LIPO" && break
38138done
38139
38140    else
38141      # If it succeeded, then it was overridden by the user. We will use it
38142      # for the tool.
38143
38144      # First remove it from the list of overridden variables, so we can test
38145      # for unknown variables in the end.
38146      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38147
38148      # Check if we try to supply an empty value
38149      if test "x$LIPO" = x; then
38150        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38151$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38152        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38153$as_echo_n "checking for LIPO... " >&6; }
38154        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38155$as_echo "disabled" >&6; }
38156      else
38157        # Check if the provided tool contains a complete path.
38158        tool_specified="$LIPO"
38159        tool_basename="${tool_specified##*/}"
38160        if test "x$tool_basename" = "x$tool_specified"; then
38161          # A command without a complete path is provided, search $PATH.
38162          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38163$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38164          # Extract the first word of "$tool_basename", so it can be a program name with args.
38165set dummy $tool_basename; ac_word=$2
38166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38167$as_echo_n "checking for $ac_word... " >&6; }
38168if ${ac_cv_path_LIPO+:} false; then :
38169  $as_echo_n "(cached) " >&6
38170else
38171  case $LIPO in
38172  [\\/]* | ?:[\\/]*)
38173  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38174  ;;
38175  *)
38176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38177for as_dir in $PATH
38178do
38179  IFS=$as_save_IFS
38180  test -z "$as_dir" && as_dir=.
38181    for ac_exec_ext in '' $ac_executable_extensions; do
38182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38183    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38185    break 2
38186  fi
38187done
38188  done
38189IFS=$as_save_IFS
38190
38191  ;;
38192esac
38193fi
38194LIPO=$ac_cv_path_LIPO
38195if test -n "$LIPO"; then
38196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38197$as_echo "$LIPO" >&6; }
38198else
38199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38200$as_echo "no" >&6; }
38201fi
38202
38203
38204          if test "x$LIPO" = x; then
38205            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38206          fi
38207        else
38208          # Otherwise we believe it is a complete path. Use it as it is.
38209          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38210$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38211          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38212$as_echo_n "checking for LIPO... " >&6; }
38213          if test ! -x "$tool_specified"; then
38214            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38215$as_echo "not found" >&6; }
38216            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38217          fi
38218          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38219$as_echo "$tool_specified" >&6; }
38220        fi
38221      fi
38222    fi
38223
38224  fi
38225
38226
38227
38228  # Only process if variable expands to non-empty
38229
38230  if test "x$LIPO" != x; then
38231    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38232
38233  # First separate the path from the arguments. This will split at the first
38234  # space.
38235  complete="$LIPO"
38236  path="${complete%% *}"
38237  tmp="$complete EOL"
38238  arguments="${tmp#* }"
38239
38240  # Input might be given as Windows format, start by converting to
38241  # unix format.
38242  new_path=`$CYGPATH -u "$path"`
38243
38244  # Now try to locate executable using which
38245  new_path=`$WHICH "$new_path" 2> /dev/null`
38246  # bat and cmd files are not always considered executable in cygwin causing which
38247  # to not find them
38248  if test "x$new_path" = x \
38249      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38250      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38251    new_path=`$CYGPATH -u "$path"`
38252  fi
38253  if test "x$new_path" = x; then
38254    # Oops. Which didn't find the executable.
38255    # The splitting of arguments from the executable at a space might have been incorrect,
38256    # since paths with space are more likely in Windows. Give it another try with the whole
38257    # argument.
38258    path="$complete"
38259    arguments="EOL"
38260    new_path=`$CYGPATH -u "$path"`
38261    new_path=`$WHICH "$new_path" 2> /dev/null`
38262    # bat and cmd files are not always considered executable in cygwin causing which
38263    # to not find them
38264    if test "x$new_path" = x \
38265        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38266        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38267      new_path=`$CYGPATH -u "$path"`
38268    fi
38269    if test "x$new_path" = x; then
38270      # It's still not found. Now this is an unrecoverable error.
38271      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38272$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38273      has_space=`$ECHO "$complete" | $GREP " "`
38274      if test "x$has_space" != x; then
38275        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38276$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38277      fi
38278      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38279    fi
38280  fi
38281
38282  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38283  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38284  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38285  # "foo.exe" is OK but "foo" is an error.
38286  #
38287  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38288  # It is also a way to make sure we got the proper file name for the real test later on.
38289  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38290  if test "x$test_shortpath" = x; then
38291    # Short path failed, file does not exist as specified.
38292    # Try adding .exe or .cmd
38293    if test -f "${new_path}.exe"; then
38294      input_to_shortpath="${new_path}.exe"
38295    elif test -f "${new_path}.cmd"; then
38296      input_to_shortpath="${new_path}.cmd"
38297    else
38298      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38299$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38300      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38301$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38302      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38303    fi
38304  else
38305    input_to_shortpath="$new_path"
38306  fi
38307
38308  # Call helper function which possibly converts this using DOS-style short mode.
38309  # If so, the updated path is stored in $new_path.
38310  new_path="$input_to_shortpath"
38311
38312  input_path="$input_to_shortpath"
38313  # Check if we need to convert this using DOS-style short mode. If the path
38314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38315  # take no chances and rewrite it.
38316  # Note: m4 eats our [], so we need to use [ and ] instead.
38317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38318  if test "x$has_forbidden_chars" != x; then
38319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38320    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38321    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38322    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38323      # Going to short mode and back again did indeed matter. Since short mode is
38324      # case insensitive, let's make it lowercase to improve readability.
38325      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38326      # Now convert it back to Unix-style (cygpath)
38327      input_path=`$CYGPATH -u "$shortmode_path"`
38328      new_path="$input_path"
38329    fi
38330  fi
38331
38332  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38333  if test "x$test_cygdrive_prefix" = x; then
38334    # As a simple fix, exclude /usr/bin since it's not a real path.
38335    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38336      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38337      # a path prefixed by /cygdrive for fixpath to work.
38338      new_path="$CYGWIN_ROOT_PATH$input_path"
38339    fi
38340  fi
38341
38342  # remove trailing .exe if any
38343  new_path="${new_path/%.exe/}"
38344
38345    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38346
38347  # First separate the path from the arguments. This will split at the first
38348  # space.
38349  complete="$LIPO"
38350  path="${complete%% *}"
38351  tmp="$complete EOL"
38352  arguments="${tmp#* }"
38353
38354  # Input might be given as Windows format, start by converting to
38355  # unix format.
38356  new_path="$path"
38357
38358  windows_path="$new_path"
38359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38360    unix_path=`$CYGPATH -u "$windows_path"`
38361    new_path="$unix_path"
38362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38364    new_path="$unix_path"
38365  fi
38366
38367
38368  # Now try to locate executable using which
38369  new_path=`$WHICH "$new_path" 2> /dev/null`
38370
38371  if test "x$new_path" = x; then
38372    # Oops. Which didn't find the executable.
38373    # The splitting of arguments from the executable at a space might have been incorrect,
38374    # since paths with space are more likely in Windows. Give it another try with the whole
38375    # argument.
38376    path="$complete"
38377    arguments="EOL"
38378    new_path="$path"
38379
38380  windows_path="$new_path"
38381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38382    unix_path=`$CYGPATH -u "$windows_path"`
38383    new_path="$unix_path"
38384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38386    new_path="$unix_path"
38387  fi
38388
38389
38390    new_path=`$WHICH "$new_path" 2> /dev/null`
38391    # bat and cmd files are not always considered executable in MSYS causing which
38392    # to not find them
38393    if test "x$new_path" = x \
38394        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38395        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38396      new_path="$path"
38397
38398  windows_path="$new_path"
38399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38400    unix_path=`$CYGPATH -u "$windows_path"`
38401    new_path="$unix_path"
38402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38404    new_path="$unix_path"
38405  fi
38406
38407    fi
38408
38409    if test "x$new_path" = x; then
38410      # It's still not found. Now this is an unrecoverable error.
38411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38412$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38413      has_space=`$ECHO "$complete" | $GREP " "`
38414      if test "x$has_space" != x; then
38415        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38416$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38417      fi
38418      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38419    fi
38420  fi
38421
38422  # Now new_path has a complete unix path to the binary
38423  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38424    # Keep paths in /bin as-is, but remove trailing .exe if any
38425    new_path="${new_path/%.exe/}"
38426    # Do not save /bin paths to all_fixpath_prefixes!
38427  else
38428    # Not in mixed or Windows style, start by that.
38429    new_path=`cmd //c echo $new_path`
38430
38431  input_path="$new_path"
38432  # Check if we need to convert this using DOS-style short mode. If the path
38433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38434  # take no chances and rewrite it.
38435  # Note: m4 eats our [], so we need to use [ and ] instead.
38436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38437  if test "x$has_forbidden_chars" != x; then
38438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38439    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38440  fi
38441
38442    # Output is in $new_path
38443
38444  windows_path="$new_path"
38445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38446    unix_path=`$CYGPATH -u "$windows_path"`
38447    new_path="$unix_path"
38448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38450    new_path="$unix_path"
38451  fi
38452
38453    # remove trailing .exe if any
38454    new_path="${new_path/%.exe/}"
38455
38456    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38457    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38458  fi
38459
38460    else
38461      # We're on a unix platform. Hooray! :)
38462      # First separate the path from the arguments. This will split at the first
38463      # space.
38464      complete="$LIPO"
38465      path="${complete%% *}"
38466      tmp="$complete EOL"
38467      arguments="${tmp#* }"
38468
38469      # Cannot rely on the command "which" here since it doesn't always work.
38470      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38471      if test -z "$is_absolute_path"; then
38472        # Path to executable is not absolute. Find it.
38473        IFS_save="$IFS"
38474        IFS=:
38475        for p in $PATH; do
38476          if test -f "$p/$path" && test -x "$p/$path"; then
38477            new_path="$p/$path"
38478            break
38479          fi
38480        done
38481        IFS="$IFS_save"
38482      else
38483        # This is an absolute path, we can use it without further modifications.
38484        new_path="$path"
38485      fi
38486
38487      if test "x$new_path" = x; then
38488        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38489$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38490        has_space=`$ECHO "$complete" | $GREP " "`
38491        if test "x$has_space" != x; then
38492          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38493$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38494        fi
38495        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38496      fi
38497    fi
38498
38499    # Now join together the path and the arguments once again
38500    if test "x$arguments" != xEOL; then
38501      new_complete="$new_path ${arguments% *}"
38502    else
38503      new_complete="$new_path"
38504    fi
38505
38506    if test "x$complete" != "x$new_complete"; then
38507      LIPO="$new_complete"
38508      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38509$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38510    fi
38511  fi
38512
38513  fi
38514
38515  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38516    # Extract the first word of "mt", so it can be a program name with args.
38517set dummy mt; ac_word=$2
38518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38519$as_echo_n "checking for $ac_word... " >&6; }
38520if ${ac_cv_prog_MT+:} false; then :
38521  $as_echo_n "(cached) " >&6
38522else
38523  if test -n "$MT"; then
38524  ac_cv_prog_MT="$MT" # Let the user override the test.
38525else
38526  ac_prog_rejected=no
38527as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38528for as_dir in $PATH
38529do
38530  IFS=$as_save_IFS
38531  test -z "$as_dir" && as_dir=.
38532    for ac_exec_ext in '' $ac_executable_extensions; do
38533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38534    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38535       ac_prog_rejected=yes
38536       continue
38537     fi
38538    ac_cv_prog_MT="mt"
38539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38540    break 2
38541  fi
38542done
38543  done
38544IFS=$as_save_IFS
38545
38546if test $ac_prog_rejected = yes; then
38547  # We found a bogon in the path, so make sure we never use it.
38548  set dummy $ac_cv_prog_MT
38549  shift
38550  if test $# != 0; then
38551    # We chose a different compiler from the bogus one.
38552    # However, it has the same basename, so the bogon will be chosen
38553    # first if we set MT to just the basename; use the full file name.
38554    shift
38555    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38556  fi
38557fi
38558fi
38559fi
38560MT=$ac_cv_prog_MT
38561if test -n "$MT"; then
38562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38563$as_echo "$MT" >&6; }
38564else
38565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38566$as_echo "no" >&6; }
38567fi
38568
38569
38570
38571  # Only process if variable expands to non-empty
38572
38573  if test "x$MT" != x; then
38574    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38575
38576  # First separate the path from the arguments. This will split at the first
38577  # space.
38578  complete="$MT"
38579  path="${complete%% *}"
38580  tmp="$complete EOL"
38581  arguments="${tmp#* }"
38582
38583  # Input might be given as Windows format, start by converting to
38584  # unix format.
38585  new_path=`$CYGPATH -u "$path"`
38586
38587  # Now try to locate executable using which
38588  new_path=`$WHICH "$new_path" 2> /dev/null`
38589  # bat and cmd files are not always considered executable in cygwin causing which
38590  # to not find them
38591  if test "x$new_path" = x \
38592      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38593      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38594    new_path=`$CYGPATH -u "$path"`
38595  fi
38596  if test "x$new_path" = x; then
38597    # Oops. Which didn't find the executable.
38598    # The splitting of arguments from the executable at a space might have been incorrect,
38599    # since paths with space are more likely in Windows. Give it another try with the whole
38600    # argument.
38601    path="$complete"
38602    arguments="EOL"
38603    new_path=`$CYGPATH -u "$path"`
38604    new_path=`$WHICH "$new_path" 2> /dev/null`
38605    # bat and cmd files are not always considered executable in cygwin causing which
38606    # to not find them
38607    if test "x$new_path" = x \
38608        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38609        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38610      new_path=`$CYGPATH -u "$path"`
38611    fi
38612    if test "x$new_path" = x; then
38613      # It's still not found. Now this is an unrecoverable error.
38614      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38615$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38616      has_space=`$ECHO "$complete" | $GREP " "`
38617      if test "x$has_space" != x; then
38618        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38619$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38620      fi
38621      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38622    fi
38623  fi
38624
38625  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38626  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38627  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38628  # "foo.exe" is OK but "foo" is an error.
38629  #
38630  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38631  # It is also a way to make sure we got the proper file name for the real test later on.
38632  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38633  if test "x$test_shortpath" = x; then
38634    # Short path failed, file does not exist as specified.
38635    # Try adding .exe or .cmd
38636    if test -f "${new_path}.exe"; then
38637      input_to_shortpath="${new_path}.exe"
38638    elif test -f "${new_path}.cmd"; then
38639      input_to_shortpath="${new_path}.cmd"
38640    else
38641      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38642$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38643      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38644$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38645      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38646    fi
38647  else
38648    input_to_shortpath="$new_path"
38649  fi
38650
38651  # Call helper function which possibly converts this using DOS-style short mode.
38652  # If so, the updated path is stored in $new_path.
38653  new_path="$input_to_shortpath"
38654
38655  input_path="$input_to_shortpath"
38656  # Check if we need to convert this using DOS-style short mode. If the path
38657  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38658  # take no chances and rewrite it.
38659  # Note: m4 eats our [], so we need to use [ and ] instead.
38660  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38661  if test "x$has_forbidden_chars" != x; then
38662    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38663    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38664    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38665    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38666      # Going to short mode and back again did indeed matter. Since short mode is
38667      # case insensitive, let's make it lowercase to improve readability.
38668      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38669      # Now convert it back to Unix-style (cygpath)
38670      input_path=`$CYGPATH -u "$shortmode_path"`
38671      new_path="$input_path"
38672    fi
38673  fi
38674
38675  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38676  if test "x$test_cygdrive_prefix" = x; then
38677    # As a simple fix, exclude /usr/bin since it's not a real path.
38678    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38679      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38680      # a path prefixed by /cygdrive for fixpath to work.
38681      new_path="$CYGWIN_ROOT_PATH$input_path"
38682    fi
38683  fi
38684
38685  # remove trailing .exe if any
38686  new_path="${new_path/%.exe/}"
38687
38688    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38689
38690  # First separate the path from the arguments. This will split at the first
38691  # space.
38692  complete="$MT"
38693  path="${complete%% *}"
38694  tmp="$complete EOL"
38695  arguments="${tmp#* }"
38696
38697  # Input might be given as Windows format, start by converting to
38698  # unix format.
38699  new_path="$path"
38700
38701  windows_path="$new_path"
38702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38703    unix_path=`$CYGPATH -u "$windows_path"`
38704    new_path="$unix_path"
38705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38707    new_path="$unix_path"
38708  fi
38709
38710
38711  # Now try to locate executable using which
38712  new_path=`$WHICH "$new_path" 2> /dev/null`
38713
38714  if test "x$new_path" = x; then
38715    # Oops. Which didn't find the executable.
38716    # The splitting of arguments from the executable at a space might have been incorrect,
38717    # since paths with space are more likely in Windows. Give it another try with the whole
38718    # argument.
38719    path="$complete"
38720    arguments="EOL"
38721    new_path="$path"
38722
38723  windows_path="$new_path"
38724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38725    unix_path=`$CYGPATH -u "$windows_path"`
38726    new_path="$unix_path"
38727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38729    new_path="$unix_path"
38730  fi
38731
38732
38733    new_path=`$WHICH "$new_path" 2> /dev/null`
38734    # bat and cmd files are not always considered executable in MSYS causing which
38735    # to not find them
38736    if test "x$new_path" = x \
38737        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38738        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38739      new_path="$path"
38740
38741  windows_path="$new_path"
38742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38743    unix_path=`$CYGPATH -u "$windows_path"`
38744    new_path="$unix_path"
38745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38747    new_path="$unix_path"
38748  fi
38749
38750    fi
38751
38752    if test "x$new_path" = x; then
38753      # It's still not found. Now this is an unrecoverable error.
38754      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38755$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38756      has_space=`$ECHO "$complete" | $GREP " "`
38757      if test "x$has_space" != x; then
38758        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38759$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38760      fi
38761      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38762    fi
38763  fi
38764
38765  # Now new_path has a complete unix path to the binary
38766  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38767    # Keep paths in /bin as-is, but remove trailing .exe if any
38768    new_path="${new_path/%.exe/}"
38769    # Do not save /bin paths to all_fixpath_prefixes!
38770  else
38771    # Not in mixed or Windows style, start by that.
38772    new_path=`cmd //c echo $new_path`
38773
38774  input_path="$new_path"
38775  # Check if we need to convert this using DOS-style short mode. If the path
38776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38777  # take no chances and rewrite it.
38778  # Note: m4 eats our [], so we need to use [ and ] instead.
38779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38780  if test "x$has_forbidden_chars" != x; then
38781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38782    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38783  fi
38784
38785    # Output is in $new_path
38786
38787  windows_path="$new_path"
38788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38789    unix_path=`$CYGPATH -u "$windows_path"`
38790    new_path="$unix_path"
38791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38793    new_path="$unix_path"
38794  fi
38795
38796    # remove trailing .exe if any
38797    new_path="${new_path/%.exe/}"
38798
38799    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38800    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38801  fi
38802
38803    else
38804      # We're on a unix platform. Hooray! :)
38805      # First separate the path from the arguments. This will split at the first
38806      # space.
38807      complete="$MT"
38808      path="${complete%% *}"
38809      tmp="$complete EOL"
38810      arguments="${tmp#* }"
38811
38812      # Cannot rely on the command "which" here since it doesn't always work.
38813      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38814      if test -z "$is_absolute_path"; then
38815        # Path to executable is not absolute. Find it.
38816        IFS_save="$IFS"
38817        IFS=:
38818        for p in $PATH; do
38819          if test -f "$p/$path" && test -x "$p/$path"; then
38820            new_path="$p/$path"
38821            break
38822          fi
38823        done
38824        IFS="$IFS_save"
38825      else
38826        # This is an absolute path, we can use it without further modifications.
38827        new_path="$path"
38828      fi
38829
38830      if test "x$new_path" = x; then
38831        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38832$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38833        has_space=`$ECHO "$complete" | $GREP " "`
38834        if test "x$has_space" != x; then
38835          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38836$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38837        fi
38838        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38839      fi
38840    fi
38841
38842    # Now join together the path and the arguments once again
38843    if test "x$arguments" != xEOL; then
38844      new_complete="$new_path ${arguments% *}"
38845    else
38846      new_complete="$new_path"
38847    fi
38848
38849    if test "x$complete" != "x$new_complete"; then
38850      MT="$new_complete"
38851      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38852$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38853    fi
38854  fi
38855
38856    # Setup the resource compiler (RC)
38857    # Extract the first word of "rc", so it can be a program name with args.
38858set dummy rc; ac_word=$2
38859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38860$as_echo_n "checking for $ac_word... " >&6; }
38861if ${ac_cv_prog_RC+:} false; then :
38862  $as_echo_n "(cached) " >&6
38863else
38864  if test -n "$RC"; then
38865  ac_cv_prog_RC="$RC" # Let the user override the test.
38866else
38867  ac_prog_rejected=no
38868as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38869for as_dir in $PATH
38870do
38871  IFS=$as_save_IFS
38872  test -z "$as_dir" && as_dir=.
38873    for ac_exec_ext in '' $ac_executable_extensions; do
38874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38875    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38876       ac_prog_rejected=yes
38877       continue
38878     fi
38879    ac_cv_prog_RC="rc"
38880    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38881    break 2
38882  fi
38883done
38884  done
38885IFS=$as_save_IFS
38886
38887if test $ac_prog_rejected = yes; then
38888  # We found a bogon in the path, so make sure we never use it.
38889  set dummy $ac_cv_prog_RC
38890  shift
38891  if test $# != 0; then
38892    # We chose a different compiler from the bogus one.
38893    # However, it has the same basename, so the bogon will be chosen
38894    # first if we set RC to just the basename; use the full file name.
38895    shift
38896    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38897  fi
38898fi
38899fi
38900fi
38901RC=$ac_cv_prog_RC
38902if test -n "$RC"; then
38903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38904$as_echo "$RC" >&6; }
38905else
38906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38907$as_echo "no" >&6; }
38908fi
38909
38910
38911
38912  # Only process if variable expands to non-empty
38913
38914  if test "x$RC" != x; then
38915    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38916
38917  # First separate the path from the arguments. This will split at the first
38918  # space.
38919  complete="$RC"
38920  path="${complete%% *}"
38921  tmp="$complete EOL"
38922  arguments="${tmp#* }"
38923
38924  # Input might be given as Windows format, start by converting to
38925  # unix format.
38926  new_path=`$CYGPATH -u "$path"`
38927
38928  # Now try to locate executable using which
38929  new_path=`$WHICH "$new_path" 2> /dev/null`
38930  # bat and cmd files are not always considered executable in cygwin causing which
38931  # to not find them
38932  if test "x$new_path" = x \
38933      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38934      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38935    new_path=`$CYGPATH -u "$path"`
38936  fi
38937  if test "x$new_path" = x; then
38938    # Oops. Which didn't find the executable.
38939    # The splitting of arguments from the executable at a space might have been incorrect,
38940    # since paths with space are more likely in Windows. Give it another try with the whole
38941    # argument.
38942    path="$complete"
38943    arguments="EOL"
38944    new_path=`$CYGPATH -u "$path"`
38945    new_path=`$WHICH "$new_path" 2> /dev/null`
38946    # bat and cmd files are not always considered executable in cygwin causing which
38947    # to not find them
38948    if test "x$new_path" = x \
38949        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38950        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38951      new_path=`$CYGPATH -u "$path"`
38952    fi
38953    if test "x$new_path" = x; then
38954      # It's still not found. Now this is an unrecoverable error.
38955      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38956$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38957      has_space=`$ECHO "$complete" | $GREP " "`
38958      if test "x$has_space" != x; then
38959        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38960$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38961      fi
38962      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38963    fi
38964  fi
38965
38966  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38967  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38968  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38969  # "foo.exe" is OK but "foo" is an error.
38970  #
38971  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38972  # It is also a way to make sure we got the proper file name for the real test later on.
38973  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38974  if test "x$test_shortpath" = x; then
38975    # Short path failed, file does not exist as specified.
38976    # Try adding .exe or .cmd
38977    if test -f "${new_path}.exe"; then
38978      input_to_shortpath="${new_path}.exe"
38979    elif test -f "${new_path}.cmd"; then
38980      input_to_shortpath="${new_path}.cmd"
38981    else
38982      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38983$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38984      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38985$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38986      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38987    fi
38988  else
38989    input_to_shortpath="$new_path"
38990  fi
38991
38992  # Call helper function which possibly converts this using DOS-style short mode.
38993  # If so, the updated path is stored in $new_path.
38994  new_path="$input_to_shortpath"
38995
38996  input_path="$input_to_shortpath"
38997  # Check if we need to convert this using DOS-style short mode. If the path
38998  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38999  # take no chances and rewrite it.
39000  # Note: m4 eats our [], so we need to use [ and ] instead.
39001  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39002  if test "x$has_forbidden_chars" != x; then
39003    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39004    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39005    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39006    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39007      # Going to short mode and back again did indeed matter. Since short mode is
39008      # case insensitive, let's make it lowercase to improve readability.
39009      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39010      # Now convert it back to Unix-style (cygpath)
39011      input_path=`$CYGPATH -u "$shortmode_path"`
39012      new_path="$input_path"
39013    fi
39014  fi
39015
39016  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39017  if test "x$test_cygdrive_prefix" = x; then
39018    # As a simple fix, exclude /usr/bin since it's not a real path.
39019    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39020      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39021      # a path prefixed by /cygdrive for fixpath to work.
39022      new_path="$CYGWIN_ROOT_PATH$input_path"
39023    fi
39024  fi
39025
39026  # remove trailing .exe if any
39027  new_path="${new_path/%.exe/}"
39028
39029    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39030
39031  # First separate the path from the arguments. This will split at the first
39032  # space.
39033  complete="$RC"
39034  path="${complete%% *}"
39035  tmp="$complete EOL"
39036  arguments="${tmp#* }"
39037
39038  # Input might be given as Windows format, start by converting to
39039  # unix format.
39040  new_path="$path"
39041
39042  windows_path="$new_path"
39043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39044    unix_path=`$CYGPATH -u "$windows_path"`
39045    new_path="$unix_path"
39046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39047    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39048    new_path="$unix_path"
39049  fi
39050
39051
39052  # Now try to locate executable using which
39053  new_path=`$WHICH "$new_path" 2> /dev/null`
39054
39055  if test "x$new_path" = x; then
39056    # Oops. Which didn't find the executable.
39057    # The splitting of arguments from the executable at a space might have been incorrect,
39058    # since paths with space are more likely in Windows. Give it another try with the whole
39059    # argument.
39060    path="$complete"
39061    arguments="EOL"
39062    new_path="$path"
39063
39064  windows_path="$new_path"
39065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39066    unix_path=`$CYGPATH -u "$windows_path"`
39067    new_path="$unix_path"
39068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39070    new_path="$unix_path"
39071  fi
39072
39073
39074    new_path=`$WHICH "$new_path" 2> /dev/null`
39075    # bat and cmd files are not always considered executable in MSYS causing which
39076    # to not find them
39077    if test "x$new_path" = x \
39078        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39079        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39080      new_path="$path"
39081
39082  windows_path="$new_path"
39083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39084    unix_path=`$CYGPATH -u "$windows_path"`
39085    new_path="$unix_path"
39086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39087    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39088    new_path="$unix_path"
39089  fi
39090
39091    fi
39092
39093    if test "x$new_path" = x; then
39094      # It's still not found. Now this is an unrecoverable error.
39095      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39096$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39097      has_space=`$ECHO "$complete" | $GREP " "`
39098      if test "x$has_space" != x; then
39099        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39100$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39101      fi
39102      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39103    fi
39104  fi
39105
39106  # Now new_path has a complete unix path to the binary
39107  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39108    # Keep paths in /bin as-is, but remove trailing .exe if any
39109    new_path="${new_path/%.exe/}"
39110    # Do not save /bin paths to all_fixpath_prefixes!
39111  else
39112    # Not in mixed or Windows style, start by that.
39113    new_path=`cmd //c echo $new_path`
39114
39115  input_path="$new_path"
39116  # Check if we need to convert this using DOS-style short mode. If the path
39117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39118  # take no chances and rewrite it.
39119  # Note: m4 eats our [], so we need to use [ and ] instead.
39120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39121  if test "x$has_forbidden_chars" != x; then
39122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39123    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39124  fi
39125
39126    # Output is in $new_path
39127
39128  windows_path="$new_path"
39129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39130    unix_path=`$CYGPATH -u "$windows_path"`
39131    new_path="$unix_path"
39132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39134    new_path="$unix_path"
39135  fi
39136
39137    # remove trailing .exe if any
39138    new_path="${new_path/%.exe/}"
39139
39140    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39141    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39142  fi
39143
39144    else
39145      # We're on a unix platform. Hooray! :)
39146      # First separate the path from the arguments. This will split at the first
39147      # space.
39148      complete="$RC"
39149      path="${complete%% *}"
39150      tmp="$complete EOL"
39151      arguments="${tmp#* }"
39152
39153      # Cannot rely on the command "which" here since it doesn't always work.
39154      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39155      if test -z "$is_absolute_path"; then
39156        # Path to executable is not absolute. Find it.
39157        IFS_save="$IFS"
39158        IFS=:
39159        for p in $PATH; do
39160          if test -f "$p/$path" && test -x "$p/$path"; then
39161            new_path="$p/$path"
39162            break
39163          fi
39164        done
39165        IFS="$IFS_save"
39166      else
39167        # This is an absolute path, we can use it without further modifications.
39168        new_path="$path"
39169      fi
39170
39171      if test "x$new_path" = x; then
39172        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39173$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39174        has_space=`$ECHO "$complete" | $GREP " "`
39175        if test "x$has_space" != x; then
39176          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39177$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39178        fi
39179        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39180      fi
39181    fi
39182
39183    # Now join together the path and the arguments once again
39184    if test "x$arguments" != xEOL; then
39185      new_complete="$new_path ${arguments% *}"
39186    else
39187      new_complete="$new_path"
39188    fi
39189
39190    if test "x$complete" != "x$new_complete"; then
39191      RC="$new_complete"
39192      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39193$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39194    fi
39195  fi
39196
39197    # Extract the first word of "dumpbin", so it can be a program name with args.
39198set dummy dumpbin; ac_word=$2
39199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39200$as_echo_n "checking for $ac_word... " >&6; }
39201if ${ac_cv_prog_DUMPBIN+:} false; then :
39202  $as_echo_n "(cached) " >&6
39203else
39204  if test -n "$DUMPBIN"; then
39205  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39206else
39207as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39208for as_dir in $PATH
39209do
39210  IFS=$as_save_IFS
39211  test -z "$as_dir" && as_dir=.
39212    for ac_exec_ext in '' $ac_executable_extensions; do
39213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39214    ac_cv_prog_DUMPBIN="dumpbin"
39215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39216    break 2
39217  fi
39218done
39219  done
39220IFS=$as_save_IFS
39221
39222fi
39223fi
39224DUMPBIN=$ac_cv_prog_DUMPBIN
39225if test -n "$DUMPBIN"; then
39226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39227$as_echo "$DUMPBIN" >&6; }
39228else
39229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39230$as_echo "no" >&6; }
39231fi
39232
39233
39234
39235  # Only process if variable expands to non-empty
39236
39237  if test "x$DUMPBIN" != x; then
39238    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39239
39240  # First separate the path from the arguments. This will split at the first
39241  # space.
39242  complete="$DUMPBIN"
39243  path="${complete%% *}"
39244  tmp="$complete EOL"
39245  arguments="${tmp#* }"
39246
39247  # Input might be given as Windows format, start by converting to
39248  # unix format.
39249  new_path=`$CYGPATH -u "$path"`
39250
39251  # Now try to locate executable using which
39252  new_path=`$WHICH "$new_path" 2> /dev/null`
39253  # bat and cmd files are not always considered executable in cygwin causing which
39254  # to not find them
39255  if test "x$new_path" = x \
39256      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39257      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39258    new_path=`$CYGPATH -u "$path"`
39259  fi
39260  if test "x$new_path" = x; then
39261    # Oops. Which didn't find the executable.
39262    # The splitting of arguments from the executable at a space might have been incorrect,
39263    # since paths with space are more likely in Windows. Give it another try with the whole
39264    # argument.
39265    path="$complete"
39266    arguments="EOL"
39267    new_path=`$CYGPATH -u "$path"`
39268    new_path=`$WHICH "$new_path" 2> /dev/null`
39269    # bat and cmd files are not always considered executable in cygwin causing which
39270    # to not find them
39271    if test "x$new_path" = x \
39272        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39273        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39274      new_path=`$CYGPATH -u "$path"`
39275    fi
39276    if test "x$new_path" = x; then
39277      # It's still not found. Now this is an unrecoverable error.
39278      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39279$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39280      has_space=`$ECHO "$complete" | $GREP " "`
39281      if test "x$has_space" != x; then
39282        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39283$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39284      fi
39285      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39286    fi
39287  fi
39288
39289  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39290  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39291  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39292  # "foo.exe" is OK but "foo" is an error.
39293  #
39294  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39295  # It is also a way to make sure we got the proper file name for the real test later on.
39296  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39297  if test "x$test_shortpath" = x; then
39298    # Short path failed, file does not exist as specified.
39299    # Try adding .exe or .cmd
39300    if test -f "${new_path}.exe"; then
39301      input_to_shortpath="${new_path}.exe"
39302    elif test -f "${new_path}.cmd"; then
39303      input_to_shortpath="${new_path}.cmd"
39304    else
39305      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39306$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39307      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39308$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39309      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39310    fi
39311  else
39312    input_to_shortpath="$new_path"
39313  fi
39314
39315  # Call helper function which possibly converts this using DOS-style short mode.
39316  # If so, the updated path is stored in $new_path.
39317  new_path="$input_to_shortpath"
39318
39319  input_path="$input_to_shortpath"
39320  # Check if we need to convert this using DOS-style short mode. If the path
39321  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39322  # take no chances and rewrite it.
39323  # Note: m4 eats our [], so we need to use [ and ] instead.
39324  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39325  if test "x$has_forbidden_chars" != x; then
39326    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39327    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39328    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39329    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39330      # Going to short mode and back again did indeed matter. Since short mode is
39331      # case insensitive, let's make it lowercase to improve readability.
39332      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39333      # Now convert it back to Unix-style (cygpath)
39334      input_path=`$CYGPATH -u "$shortmode_path"`
39335      new_path="$input_path"
39336    fi
39337  fi
39338
39339  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39340  if test "x$test_cygdrive_prefix" = x; then
39341    # As a simple fix, exclude /usr/bin since it's not a real path.
39342    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39343      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39344      # a path prefixed by /cygdrive for fixpath to work.
39345      new_path="$CYGWIN_ROOT_PATH$input_path"
39346    fi
39347  fi
39348
39349  # remove trailing .exe if any
39350  new_path="${new_path/%.exe/}"
39351
39352    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39353
39354  # First separate the path from the arguments. This will split at the first
39355  # space.
39356  complete="$DUMPBIN"
39357  path="${complete%% *}"
39358  tmp="$complete EOL"
39359  arguments="${tmp#* }"
39360
39361  # Input might be given as Windows format, start by converting to
39362  # unix format.
39363  new_path="$path"
39364
39365  windows_path="$new_path"
39366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39367    unix_path=`$CYGPATH -u "$windows_path"`
39368    new_path="$unix_path"
39369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39371    new_path="$unix_path"
39372  fi
39373
39374
39375  # Now try to locate executable using which
39376  new_path=`$WHICH "$new_path" 2> /dev/null`
39377
39378  if test "x$new_path" = x; then
39379    # Oops. Which didn't find the executable.
39380    # The splitting of arguments from the executable at a space might have been incorrect,
39381    # since paths with space are more likely in Windows. Give it another try with the whole
39382    # argument.
39383    path="$complete"
39384    arguments="EOL"
39385    new_path="$path"
39386
39387  windows_path="$new_path"
39388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39389    unix_path=`$CYGPATH -u "$windows_path"`
39390    new_path="$unix_path"
39391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39393    new_path="$unix_path"
39394  fi
39395
39396
39397    new_path=`$WHICH "$new_path" 2> /dev/null`
39398    # bat and cmd files are not always considered executable in MSYS causing which
39399    # to not find them
39400    if test "x$new_path" = x \
39401        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39402        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39403      new_path="$path"
39404
39405  windows_path="$new_path"
39406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39407    unix_path=`$CYGPATH -u "$windows_path"`
39408    new_path="$unix_path"
39409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39411    new_path="$unix_path"
39412  fi
39413
39414    fi
39415
39416    if test "x$new_path" = x; then
39417      # It's still not found. Now this is an unrecoverable error.
39418      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39419$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39420      has_space=`$ECHO "$complete" | $GREP " "`
39421      if test "x$has_space" != x; then
39422        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39423$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39424      fi
39425      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39426    fi
39427  fi
39428
39429  # Now new_path has a complete unix path to the binary
39430  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39431    # Keep paths in /bin as-is, but remove trailing .exe if any
39432    new_path="${new_path/%.exe/}"
39433    # Do not save /bin paths to all_fixpath_prefixes!
39434  else
39435    # Not in mixed or Windows style, start by that.
39436    new_path=`cmd //c echo $new_path`
39437
39438  input_path="$new_path"
39439  # Check if we need to convert this using DOS-style short mode. If the path
39440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39441  # take no chances and rewrite it.
39442  # Note: m4 eats our [], so we need to use [ and ] instead.
39443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39444  if test "x$has_forbidden_chars" != x; then
39445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39446    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39447  fi
39448
39449    # Output is in $new_path
39450
39451  windows_path="$new_path"
39452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39453    unix_path=`$CYGPATH -u "$windows_path"`
39454    new_path="$unix_path"
39455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39457    new_path="$unix_path"
39458  fi
39459
39460    # remove trailing .exe if any
39461    new_path="${new_path/%.exe/}"
39462
39463    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39464    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39465  fi
39466
39467    else
39468      # We're on a unix platform. Hooray! :)
39469      # First separate the path from the arguments. This will split at the first
39470      # space.
39471      complete="$DUMPBIN"
39472      path="${complete%% *}"
39473      tmp="$complete EOL"
39474      arguments="${tmp#* }"
39475
39476      # Cannot rely on the command "which" here since it doesn't always work.
39477      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39478      if test -z "$is_absolute_path"; then
39479        # Path to executable is not absolute. Find it.
39480        IFS_save="$IFS"
39481        IFS=:
39482        for p in $PATH; do
39483          if test -f "$p/$path" && test -x "$p/$path"; then
39484            new_path="$p/$path"
39485            break
39486          fi
39487        done
39488        IFS="$IFS_save"
39489      else
39490        # This is an absolute path, we can use it without further modifications.
39491        new_path="$path"
39492      fi
39493
39494      if test "x$new_path" = x; then
39495        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39496$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39497        has_space=`$ECHO "$complete" | $GREP " "`
39498        if test "x$has_space" != x; then
39499          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39500$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39501        fi
39502        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39503      fi
39504    fi
39505
39506    # Now join together the path and the arguments once again
39507    if test "x$arguments" != xEOL; then
39508      new_complete="$new_path ${arguments% *}"
39509    else
39510      new_complete="$new_path"
39511    fi
39512
39513    if test "x$complete" != "x$new_complete"; then
39514      DUMPBIN="$new_complete"
39515      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39516$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39517    fi
39518  fi
39519
39520    # We need to check for 'msbuild.exe' because at the place where we expect to
39521    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39522    # won't find the 'msbuild.exe' executable in that case (and the
39523    # 'ac_executable_extensions' is unusable due to performance reasons).
39524    # Notice that we intentionally don't fix up the path to MSBUILD because we
39525    # will call it in a DOS shell during freetype detection on Windows (see
39526    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39527    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39528set dummy msbuild.exe; ac_word=$2
39529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39530$as_echo_n "checking for $ac_word... " >&6; }
39531if ${ac_cv_prog_MSBUILD+:} false; then :
39532  $as_echo_n "(cached) " >&6
39533else
39534  if test -n "$MSBUILD"; then
39535  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39536else
39537as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39538for as_dir in $PATH
39539do
39540  IFS=$as_save_IFS
39541  test -z "$as_dir" && as_dir=.
39542    for ac_exec_ext in '' $ac_executable_extensions; do
39543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39544    ac_cv_prog_MSBUILD="msbuild.exe"
39545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39546    break 2
39547  fi
39548done
39549  done
39550IFS=$as_save_IFS
39551
39552fi
39553fi
39554MSBUILD=$ac_cv_prog_MSBUILD
39555if test -n "$MSBUILD"; then
39556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39557$as_echo "$MSBUILD" >&6; }
39558else
39559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39560$as_echo "no" >&6; }
39561fi
39562
39563
39564  fi
39565
39566  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39567
39568
39569  # Publish this variable in the help.
39570
39571
39572  if [ -z "${STRIP+x}" ]; then
39573    # The variable is not set by user, try to locate tool using the code snippet
39574    for ac_prog in strip
39575do
39576  # Extract the first word of "$ac_prog", so it can be a program name with args.
39577set dummy $ac_prog; ac_word=$2
39578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39579$as_echo_n "checking for $ac_word... " >&6; }
39580if ${ac_cv_path_STRIP+:} false; then :
39581  $as_echo_n "(cached) " >&6
39582else
39583  case $STRIP in
39584  [\\/]* | ?:[\\/]*)
39585  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39586  ;;
39587  *)
39588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39589for as_dir in $PATH
39590do
39591  IFS=$as_save_IFS
39592  test -z "$as_dir" && as_dir=.
39593    for ac_exec_ext in '' $ac_executable_extensions; do
39594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39595    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39597    break 2
39598  fi
39599done
39600  done
39601IFS=$as_save_IFS
39602
39603  ;;
39604esac
39605fi
39606STRIP=$ac_cv_path_STRIP
39607if test -n "$STRIP"; then
39608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39609$as_echo "$STRIP" >&6; }
39610else
39611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39612$as_echo "no" >&6; }
39613fi
39614
39615
39616  test -n "$STRIP" && break
39617done
39618
39619  else
39620    # The variable is set, but is it from the command line or the environment?
39621
39622    # Try to remove the string !STRIP! from our list.
39623    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39624    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39625      # If it failed, the variable was not from the command line. Ignore it,
39626      # but warn the user (except for BASH, which is always set by the calling BASH).
39627      if test "xSTRIP" != xBASH; then
39628        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39629$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39630      fi
39631      # Try to locate tool using the code snippet
39632      for ac_prog in strip
39633do
39634  # Extract the first word of "$ac_prog", so it can be a program name with args.
39635set dummy $ac_prog; ac_word=$2
39636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39637$as_echo_n "checking for $ac_word... " >&6; }
39638if ${ac_cv_path_STRIP+:} false; then :
39639  $as_echo_n "(cached) " >&6
39640else
39641  case $STRIP in
39642  [\\/]* | ?:[\\/]*)
39643  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39644  ;;
39645  *)
39646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39647for as_dir in $PATH
39648do
39649  IFS=$as_save_IFS
39650  test -z "$as_dir" && as_dir=.
39651    for ac_exec_ext in '' $ac_executable_extensions; do
39652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39653    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39655    break 2
39656  fi
39657done
39658  done
39659IFS=$as_save_IFS
39660
39661  ;;
39662esac
39663fi
39664STRIP=$ac_cv_path_STRIP
39665if test -n "$STRIP"; then
39666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39667$as_echo "$STRIP" >&6; }
39668else
39669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39670$as_echo "no" >&6; }
39671fi
39672
39673
39674  test -n "$STRIP" && break
39675done
39676
39677    else
39678      # If it succeeded, then it was overridden by the user. We will use it
39679      # for the tool.
39680
39681      # First remove it from the list of overridden variables, so we can test
39682      # for unknown variables in the end.
39683      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39684
39685      # Check if we try to supply an empty value
39686      if test "x$STRIP" = x; then
39687        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39688$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39689        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39690$as_echo_n "checking for STRIP... " >&6; }
39691        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39692$as_echo "disabled" >&6; }
39693      else
39694        # Check if the provided tool contains a complete path.
39695        tool_specified="$STRIP"
39696        tool_basename="${tool_specified##*/}"
39697        if test "x$tool_basename" = "x$tool_specified"; then
39698          # A command without a complete path is provided, search $PATH.
39699          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39700$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39701          # Extract the first word of "$tool_basename", so it can be a program name with args.
39702set dummy $tool_basename; ac_word=$2
39703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39704$as_echo_n "checking for $ac_word... " >&6; }
39705if ${ac_cv_path_STRIP+:} false; then :
39706  $as_echo_n "(cached) " >&6
39707else
39708  case $STRIP in
39709  [\\/]* | ?:[\\/]*)
39710  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39711  ;;
39712  *)
39713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39714for as_dir in $PATH
39715do
39716  IFS=$as_save_IFS
39717  test -z "$as_dir" && as_dir=.
39718    for ac_exec_ext in '' $ac_executable_extensions; do
39719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39720    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39722    break 2
39723  fi
39724done
39725  done
39726IFS=$as_save_IFS
39727
39728  ;;
39729esac
39730fi
39731STRIP=$ac_cv_path_STRIP
39732if test -n "$STRIP"; then
39733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39734$as_echo "$STRIP" >&6; }
39735else
39736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39737$as_echo "no" >&6; }
39738fi
39739
39740
39741          if test "x$STRIP" = x; then
39742            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39743          fi
39744        else
39745          # Otherwise we believe it is a complete path. Use it as it is.
39746          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39747$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39748          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39749$as_echo_n "checking for STRIP... " >&6; }
39750          if test ! -x "$tool_specified"; then
39751            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39752$as_echo "not found" >&6; }
39753            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39754          fi
39755          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39756$as_echo "$tool_specified" >&6; }
39757        fi
39758      fi
39759    fi
39760
39761  fi
39762
39763
39764
39765  # Only process if variable expands to non-empty
39766
39767  if test "x$STRIP" != x; then
39768    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39769
39770  # First separate the path from the arguments. This will split at the first
39771  # space.
39772  complete="$STRIP"
39773  path="${complete%% *}"
39774  tmp="$complete EOL"
39775  arguments="${tmp#* }"
39776
39777  # Input might be given as Windows format, start by converting to
39778  # unix format.
39779  new_path=`$CYGPATH -u "$path"`
39780
39781  # Now try to locate executable using which
39782  new_path=`$WHICH "$new_path" 2> /dev/null`
39783  # bat and cmd files are not always considered executable in cygwin causing which
39784  # to not find them
39785  if test "x$new_path" = x \
39786      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39787      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39788    new_path=`$CYGPATH -u "$path"`
39789  fi
39790  if test "x$new_path" = x; then
39791    # Oops. Which didn't find the executable.
39792    # The splitting of arguments from the executable at a space might have been incorrect,
39793    # since paths with space are more likely in Windows. Give it another try with the whole
39794    # argument.
39795    path="$complete"
39796    arguments="EOL"
39797    new_path=`$CYGPATH -u "$path"`
39798    new_path=`$WHICH "$new_path" 2> /dev/null`
39799    # bat and cmd files are not always considered executable in cygwin causing which
39800    # to not find them
39801    if test "x$new_path" = x \
39802        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39803        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39804      new_path=`$CYGPATH -u "$path"`
39805    fi
39806    if test "x$new_path" = x; then
39807      # It's still not found. Now this is an unrecoverable error.
39808      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39809$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39810      has_space=`$ECHO "$complete" | $GREP " "`
39811      if test "x$has_space" != x; then
39812        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39813$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39814      fi
39815      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39816    fi
39817  fi
39818
39819  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39820  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39821  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39822  # "foo.exe" is OK but "foo" is an error.
39823  #
39824  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39825  # It is also a way to make sure we got the proper file name for the real test later on.
39826  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39827  if test "x$test_shortpath" = x; then
39828    # Short path failed, file does not exist as specified.
39829    # Try adding .exe or .cmd
39830    if test -f "${new_path}.exe"; then
39831      input_to_shortpath="${new_path}.exe"
39832    elif test -f "${new_path}.cmd"; then
39833      input_to_shortpath="${new_path}.cmd"
39834    else
39835      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39836$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39837      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39838$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39839      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39840    fi
39841  else
39842    input_to_shortpath="$new_path"
39843  fi
39844
39845  # Call helper function which possibly converts this using DOS-style short mode.
39846  # If so, the updated path is stored in $new_path.
39847  new_path="$input_to_shortpath"
39848
39849  input_path="$input_to_shortpath"
39850  # Check if we need to convert this using DOS-style short mode. If the path
39851  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39852  # take no chances and rewrite it.
39853  # Note: m4 eats our [], so we need to use [ and ] instead.
39854  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39855  if test "x$has_forbidden_chars" != x; then
39856    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39857    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39858    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39859    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39860      # Going to short mode and back again did indeed matter. Since short mode is
39861      # case insensitive, let's make it lowercase to improve readability.
39862      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39863      # Now convert it back to Unix-style (cygpath)
39864      input_path=`$CYGPATH -u "$shortmode_path"`
39865      new_path="$input_path"
39866    fi
39867  fi
39868
39869  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39870  if test "x$test_cygdrive_prefix" = x; then
39871    # As a simple fix, exclude /usr/bin since it's not a real path.
39872    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39873      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39874      # a path prefixed by /cygdrive for fixpath to work.
39875      new_path="$CYGWIN_ROOT_PATH$input_path"
39876    fi
39877  fi
39878
39879  # remove trailing .exe if any
39880  new_path="${new_path/%.exe/}"
39881
39882    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39883
39884  # First separate the path from the arguments. This will split at the first
39885  # space.
39886  complete="$STRIP"
39887  path="${complete%% *}"
39888  tmp="$complete EOL"
39889  arguments="${tmp#* }"
39890
39891  # Input might be given as Windows format, start by converting to
39892  # unix format.
39893  new_path="$path"
39894
39895  windows_path="$new_path"
39896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39897    unix_path=`$CYGPATH -u "$windows_path"`
39898    new_path="$unix_path"
39899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39901    new_path="$unix_path"
39902  fi
39903
39904
39905  # Now try to locate executable using which
39906  new_path=`$WHICH "$new_path" 2> /dev/null`
39907
39908  if test "x$new_path" = x; then
39909    # Oops. Which didn't find the executable.
39910    # The splitting of arguments from the executable at a space might have been incorrect,
39911    # since paths with space are more likely in Windows. Give it another try with the whole
39912    # argument.
39913    path="$complete"
39914    arguments="EOL"
39915    new_path="$path"
39916
39917  windows_path="$new_path"
39918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39919    unix_path=`$CYGPATH -u "$windows_path"`
39920    new_path="$unix_path"
39921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39923    new_path="$unix_path"
39924  fi
39925
39926
39927    new_path=`$WHICH "$new_path" 2> /dev/null`
39928    # bat and cmd files are not always considered executable in MSYS causing which
39929    # to not find them
39930    if test "x$new_path" = x \
39931        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39932        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39933      new_path="$path"
39934
39935  windows_path="$new_path"
39936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39937    unix_path=`$CYGPATH -u "$windows_path"`
39938    new_path="$unix_path"
39939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39941    new_path="$unix_path"
39942  fi
39943
39944    fi
39945
39946    if test "x$new_path" = x; then
39947      # It's still not found. Now this is an unrecoverable error.
39948      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39949$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39950      has_space=`$ECHO "$complete" | $GREP " "`
39951      if test "x$has_space" != x; then
39952        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39953$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39954      fi
39955      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39956    fi
39957  fi
39958
39959  # Now new_path has a complete unix path to the binary
39960  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39961    # Keep paths in /bin as-is, but remove trailing .exe if any
39962    new_path="${new_path/%.exe/}"
39963    # Do not save /bin paths to all_fixpath_prefixes!
39964  else
39965    # Not in mixed or Windows style, start by that.
39966    new_path=`cmd //c echo $new_path`
39967
39968  input_path="$new_path"
39969  # Check if we need to convert this using DOS-style short mode. If the path
39970  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39971  # take no chances and rewrite it.
39972  # Note: m4 eats our [], so we need to use [ and ] instead.
39973  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39974  if test "x$has_forbidden_chars" != x; then
39975    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39976    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39977  fi
39978
39979    # Output is in $new_path
39980
39981  windows_path="$new_path"
39982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39983    unix_path=`$CYGPATH -u "$windows_path"`
39984    new_path="$unix_path"
39985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39986    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39987    new_path="$unix_path"
39988  fi
39989
39990    # remove trailing .exe if any
39991    new_path="${new_path/%.exe/}"
39992
39993    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39994    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39995  fi
39996
39997    else
39998      # We're on a unix platform. Hooray! :)
39999      # First separate the path from the arguments. This will split at the first
40000      # space.
40001      complete="$STRIP"
40002      path="${complete%% *}"
40003      tmp="$complete EOL"
40004      arguments="${tmp#* }"
40005
40006      # Cannot rely on the command "which" here since it doesn't always work.
40007      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40008      if test -z "$is_absolute_path"; then
40009        # Path to executable is not absolute. Find it.
40010        IFS_save="$IFS"
40011        IFS=:
40012        for p in $PATH; do
40013          if test -f "$p/$path" && test -x "$p/$path"; then
40014            new_path="$p/$path"
40015            break
40016          fi
40017        done
40018        IFS="$IFS_save"
40019      else
40020        # This is an absolute path, we can use it without further modifications.
40021        new_path="$path"
40022      fi
40023
40024      if test "x$new_path" = x; then
40025        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40026$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40027        has_space=`$ECHO "$complete" | $GREP " "`
40028        if test "x$has_space" != x; then
40029          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40030$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40031        fi
40032        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40033      fi
40034    fi
40035
40036    # Now join together the path and the arguments once again
40037    if test "x$arguments" != xEOL; then
40038      new_complete="$new_path ${arguments% *}"
40039    else
40040      new_complete="$new_path"
40041    fi
40042
40043    if test "x$complete" != "x$new_complete"; then
40044      STRIP="$new_complete"
40045      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40046$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40047    fi
40048  fi
40049
40050
40051
40052  # Publish this variable in the help.
40053
40054
40055  if [ -z "${NM+x}" ]; then
40056    # The variable is not set by user, try to locate tool using the code snippet
40057    for ac_prog in nm
40058do
40059  # Extract the first word of "$ac_prog", so it can be a program name with args.
40060set dummy $ac_prog; ac_word=$2
40061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40062$as_echo_n "checking for $ac_word... " >&6; }
40063if ${ac_cv_path_NM+:} false; then :
40064  $as_echo_n "(cached) " >&6
40065else
40066  case $NM in
40067  [\\/]* | ?:[\\/]*)
40068  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40069  ;;
40070  *)
40071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40072for as_dir in $PATH
40073do
40074  IFS=$as_save_IFS
40075  test -z "$as_dir" && as_dir=.
40076    for ac_exec_ext in '' $ac_executable_extensions; do
40077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40078    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40080    break 2
40081  fi
40082done
40083  done
40084IFS=$as_save_IFS
40085
40086  ;;
40087esac
40088fi
40089NM=$ac_cv_path_NM
40090if test -n "$NM"; then
40091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40092$as_echo "$NM" >&6; }
40093else
40094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40095$as_echo "no" >&6; }
40096fi
40097
40098
40099  test -n "$NM" && break
40100done
40101
40102  else
40103    # The variable is set, but is it from the command line or the environment?
40104
40105    # Try to remove the string !NM! from our list.
40106    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40107    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40108      # If it failed, the variable was not from the command line. Ignore it,
40109      # but warn the user (except for BASH, which is always set by the calling BASH).
40110      if test "xNM" != xBASH; then
40111        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40112$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40113      fi
40114      # Try to locate tool using the code snippet
40115      for ac_prog in nm
40116do
40117  # Extract the first word of "$ac_prog", so it can be a program name with args.
40118set dummy $ac_prog; ac_word=$2
40119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40120$as_echo_n "checking for $ac_word... " >&6; }
40121if ${ac_cv_path_NM+:} false; then :
40122  $as_echo_n "(cached) " >&6
40123else
40124  case $NM in
40125  [\\/]* | ?:[\\/]*)
40126  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40127  ;;
40128  *)
40129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40130for as_dir in $PATH
40131do
40132  IFS=$as_save_IFS
40133  test -z "$as_dir" && as_dir=.
40134    for ac_exec_ext in '' $ac_executable_extensions; do
40135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40136    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40138    break 2
40139  fi
40140done
40141  done
40142IFS=$as_save_IFS
40143
40144  ;;
40145esac
40146fi
40147NM=$ac_cv_path_NM
40148if test -n "$NM"; then
40149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40150$as_echo "$NM" >&6; }
40151else
40152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40153$as_echo "no" >&6; }
40154fi
40155
40156
40157  test -n "$NM" && break
40158done
40159
40160    else
40161      # If it succeeded, then it was overridden by the user. We will use it
40162      # for the tool.
40163
40164      # First remove it from the list of overridden variables, so we can test
40165      # for unknown variables in the end.
40166      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40167
40168      # Check if we try to supply an empty value
40169      if test "x$NM" = x; then
40170        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40171$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40172        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40173$as_echo_n "checking for NM... " >&6; }
40174        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40175$as_echo "disabled" >&6; }
40176      else
40177        # Check if the provided tool contains a complete path.
40178        tool_specified="$NM"
40179        tool_basename="${tool_specified##*/}"
40180        if test "x$tool_basename" = "x$tool_specified"; then
40181          # A command without a complete path is provided, search $PATH.
40182          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40183$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40184          # Extract the first word of "$tool_basename", so it can be a program name with args.
40185set dummy $tool_basename; ac_word=$2
40186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40187$as_echo_n "checking for $ac_word... " >&6; }
40188if ${ac_cv_path_NM+:} false; then :
40189  $as_echo_n "(cached) " >&6
40190else
40191  case $NM in
40192  [\\/]* | ?:[\\/]*)
40193  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40194  ;;
40195  *)
40196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40197for as_dir in $PATH
40198do
40199  IFS=$as_save_IFS
40200  test -z "$as_dir" && as_dir=.
40201    for ac_exec_ext in '' $ac_executable_extensions; do
40202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40203    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40205    break 2
40206  fi
40207done
40208  done
40209IFS=$as_save_IFS
40210
40211  ;;
40212esac
40213fi
40214NM=$ac_cv_path_NM
40215if test -n "$NM"; then
40216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40217$as_echo "$NM" >&6; }
40218else
40219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40220$as_echo "no" >&6; }
40221fi
40222
40223
40224          if test "x$NM" = x; then
40225            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40226          fi
40227        else
40228          # Otherwise we believe it is a complete path. Use it as it is.
40229          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40230$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40231          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40232$as_echo_n "checking for NM... " >&6; }
40233          if test ! -x "$tool_specified"; then
40234            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40235$as_echo "not found" >&6; }
40236            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40237          fi
40238          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40239$as_echo "$tool_specified" >&6; }
40240        fi
40241      fi
40242    fi
40243
40244  fi
40245
40246
40247
40248  # Only process if variable expands to non-empty
40249
40250  if test "x$NM" != x; then
40251    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40252
40253  # First separate the path from the arguments. This will split at the first
40254  # space.
40255  complete="$NM"
40256  path="${complete%% *}"
40257  tmp="$complete EOL"
40258  arguments="${tmp#* }"
40259
40260  # Input might be given as Windows format, start by converting to
40261  # unix format.
40262  new_path=`$CYGPATH -u "$path"`
40263
40264  # Now try to locate executable using which
40265  new_path=`$WHICH "$new_path" 2> /dev/null`
40266  # bat and cmd files are not always considered executable in cygwin causing which
40267  # to not find them
40268  if test "x$new_path" = x \
40269      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40270      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40271    new_path=`$CYGPATH -u "$path"`
40272  fi
40273  if test "x$new_path" = x; then
40274    # Oops. Which didn't find the executable.
40275    # The splitting of arguments from the executable at a space might have been incorrect,
40276    # since paths with space are more likely in Windows. Give it another try with the whole
40277    # argument.
40278    path="$complete"
40279    arguments="EOL"
40280    new_path=`$CYGPATH -u "$path"`
40281    new_path=`$WHICH "$new_path" 2> /dev/null`
40282    # bat and cmd files are not always considered executable in cygwin causing which
40283    # to not find them
40284    if test "x$new_path" = x \
40285        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40286        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40287      new_path=`$CYGPATH -u "$path"`
40288    fi
40289    if test "x$new_path" = x; then
40290      # It's still not found. Now this is an unrecoverable error.
40291      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40292$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40293      has_space=`$ECHO "$complete" | $GREP " "`
40294      if test "x$has_space" != x; then
40295        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40296$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40297      fi
40298      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40299    fi
40300  fi
40301
40302  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40303  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40304  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40305  # "foo.exe" is OK but "foo" is an error.
40306  #
40307  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40308  # It is also a way to make sure we got the proper file name for the real test later on.
40309  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40310  if test "x$test_shortpath" = x; then
40311    # Short path failed, file does not exist as specified.
40312    # Try adding .exe or .cmd
40313    if test -f "${new_path}.exe"; then
40314      input_to_shortpath="${new_path}.exe"
40315    elif test -f "${new_path}.cmd"; then
40316      input_to_shortpath="${new_path}.cmd"
40317    else
40318      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40319$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40320      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40321$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40322      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40323    fi
40324  else
40325    input_to_shortpath="$new_path"
40326  fi
40327
40328  # Call helper function which possibly converts this using DOS-style short mode.
40329  # If so, the updated path is stored in $new_path.
40330  new_path="$input_to_shortpath"
40331
40332  input_path="$input_to_shortpath"
40333  # Check if we need to convert this using DOS-style short mode. If the path
40334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40335  # take no chances and rewrite it.
40336  # Note: m4 eats our [], so we need to use [ and ] instead.
40337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40338  if test "x$has_forbidden_chars" != x; then
40339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40340    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40341    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40342    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40343      # Going to short mode and back again did indeed matter. Since short mode is
40344      # case insensitive, let's make it lowercase to improve readability.
40345      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40346      # Now convert it back to Unix-style (cygpath)
40347      input_path=`$CYGPATH -u "$shortmode_path"`
40348      new_path="$input_path"
40349    fi
40350  fi
40351
40352  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40353  if test "x$test_cygdrive_prefix" = x; then
40354    # As a simple fix, exclude /usr/bin since it's not a real path.
40355    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40356      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40357      # a path prefixed by /cygdrive for fixpath to work.
40358      new_path="$CYGWIN_ROOT_PATH$input_path"
40359    fi
40360  fi
40361
40362  # remove trailing .exe if any
40363  new_path="${new_path/%.exe/}"
40364
40365    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40366
40367  # First separate the path from the arguments. This will split at the first
40368  # space.
40369  complete="$NM"
40370  path="${complete%% *}"
40371  tmp="$complete EOL"
40372  arguments="${tmp#* }"
40373
40374  # Input might be given as Windows format, start by converting to
40375  # unix format.
40376  new_path="$path"
40377
40378  windows_path="$new_path"
40379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40380    unix_path=`$CYGPATH -u "$windows_path"`
40381    new_path="$unix_path"
40382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40384    new_path="$unix_path"
40385  fi
40386
40387
40388  # Now try to locate executable using which
40389  new_path=`$WHICH "$new_path" 2> /dev/null`
40390
40391  if test "x$new_path" = x; then
40392    # Oops. Which didn't find the executable.
40393    # The splitting of arguments from the executable at a space might have been incorrect,
40394    # since paths with space are more likely in Windows. Give it another try with the whole
40395    # argument.
40396    path="$complete"
40397    arguments="EOL"
40398    new_path="$path"
40399
40400  windows_path="$new_path"
40401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40402    unix_path=`$CYGPATH -u "$windows_path"`
40403    new_path="$unix_path"
40404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40406    new_path="$unix_path"
40407  fi
40408
40409
40410    new_path=`$WHICH "$new_path" 2> /dev/null`
40411    # bat and cmd files are not always considered executable in MSYS causing which
40412    # to not find them
40413    if test "x$new_path" = x \
40414        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40415        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40416      new_path="$path"
40417
40418  windows_path="$new_path"
40419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40420    unix_path=`$CYGPATH -u "$windows_path"`
40421    new_path="$unix_path"
40422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40424    new_path="$unix_path"
40425  fi
40426
40427    fi
40428
40429    if test "x$new_path" = x; then
40430      # It's still not found. Now this is an unrecoverable error.
40431      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40432$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40433      has_space=`$ECHO "$complete" | $GREP " "`
40434      if test "x$has_space" != x; then
40435        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40436$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40437      fi
40438      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40439    fi
40440  fi
40441
40442  # Now new_path has a complete unix path to the binary
40443  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40444    # Keep paths in /bin as-is, but remove trailing .exe if any
40445    new_path="${new_path/%.exe/}"
40446    # Do not save /bin paths to all_fixpath_prefixes!
40447  else
40448    # Not in mixed or Windows style, start by that.
40449    new_path=`cmd //c echo $new_path`
40450
40451  input_path="$new_path"
40452  # Check if we need to convert this using DOS-style short mode. If the path
40453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40454  # take no chances and rewrite it.
40455  # Note: m4 eats our [], so we need to use [ and ] instead.
40456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40457  if test "x$has_forbidden_chars" != x; then
40458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40459    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40460  fi
40461
40462    # Output is in $new_path
40463
40464  windows_path="$new_path"
40465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40466    unix_path=`$CYGPATH -u "$windows_path"`
40467    new_path="$unix_path"
40468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40470    new_path="$unix_path"
40471  fi
40472
40473    # remove trailing .exe if any
40474    new_path="${new_path/%.exe/}"
40475
40476    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40477    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40478  fi
40479
40480    else
40481      # We're on a unix platform. Hooray! :)
40482      # First separate the path from the arguments. This will split at the first
40483      # space.
40484      complete="$NM"
40485      path="${complete%% *}"
40486      tmp="$complete EOL"
40487      arguments="${tmp#* }"
40488
40489      # Cannot rely on the command "which" here since it doesn't always work.
40490      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40491      if test -z "$is_absolute_path"; then
40492        # Path to executable is not absolute. Find it.
40493        IFS_save="$IFS"
40494        IFS=:
40495        for p in $PATH; do
40496          if test -f "$p/$path" && test -x "$p/$path"; then
40497            new_path="$p/$path"
40498            break
40499          fi
40500        done
40501        IFS="$IFS_save"
40502      else
40503        # This is an absolute path, we can use it without further modifications.
40504        new_path="$path"
40505      fi
40506
40507      if test "x$new_path" = x; then
40508        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40509$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40510        has_space=`$ECHO "$complete" | $GREP " "`
40511        if test "x$has_space" != x; then
40512          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40513$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40514        fi
40515        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40516      fi
40517    fi
40518
40519    # Now join together the path and the arguments once again
40520    if test "x$arguments" != xEOL; then
40521      new_complete="$new_path ${arguments% *}"
40522    else
40523      new_complete="$new_path"
40524    fi
40525
40526    if test "x$complete" != "x$new_complete"; then
40527      NM="$new_complete"
40528      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40529$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40530    fi
40531  fi
40532
40533
40534
40535  # Publish this variable in the help.
40536
40537
40538  if [ -z "${GNM+x}" ]; then
40539    # The variable is not set by user, try to locate tool using the code snippet
40540    for ac_prog in gnm
40541do
40542  # Extract the first word of "$ac_prog", so it can be a program name with args.
40543set dummy $ac_prog; ac_word=$2
40544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40545$as_echo_n "checking for $ac_word... " >&6; }
40546if ${ac_cv_path_GNM+:} false; then :
40547  $as_echo_n "(cached) " >&6
40548else
40549  case $GNM in
40550  [\\/]* | ?:[\\/]*)
40551  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40552  ;;
40553  *)
40554  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40555for as_dir in $PATH
40556do
40557  IFS=$as_save_IFS
40558  test -z "$as_dir" && as_dir=.
40559    for ac_exec_ext in '' $ac_executable_extensions; do
40560  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40561    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40563    break 2
40564  fi
40565done
40566  done
40567IFS=$as_save_IFS
40568
40569  ;;
40570esac
40571fi
40572GNM=$ac_cv_path_GNM
40573if test -n "$GNM"; then
40574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40575$as_echo "$GNM" >&6; }
40576else
40577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40578$as_echo "no" >&6; }
40579fi
40580
40581
40582  test -n "$GNM" && break
40583done
40584
40585  else
40586    # The variable is set, but is it from the command line or the environment?
40587
40588    # Try to remove the string !GNM! from our list.
40589    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40590    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40591      # If it failed, the variable was not from the command line. Ignore it,
40592      # but warn the user (except for BASH, which is always set by the calling BASH).
40593      if test "xGNM" != xBASH; then
40594        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40595$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40596      fi
40597      # Try to locate tool using the code snippet
40598      for ac_prog in gnm
40599do
40600  # Extract the first word of "$ac_prog", so it can be a program name with args.
40601set dummy $ac_prog; ac_word=$2
40602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40603$as_echo_n "checking for $ac_word... " >&6; }
40604if ${ac_cv_path_GNM+:} false; then :
40605  $as_echo_n "(cached) " >&6
40606else
40607  case $GNM in
40608  [\\/]* | ?:[\\/]*)
40609  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40610  ;;
40611  *)
40612  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40613for as_dir in $PATH
40614do
40615  IFS=$as_save_IFS
40616  test -z "$as_dir" && as_dir=.
40617    for ac_exec_ext in '' $ac_executable_extensions; do
40618  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40619    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40621    break 2
40622  fi
40623done
40624  done
40625IFS=$as_save_IFS
40626
40627  ;;
40628esac
40629fi
40630GNM=$ac_cv_path_GNM
40631if test -n "$GNM"; then
40632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40633$as_echo "$GNM" >&6; }
40634else
40635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40636$as_echo "no" >&6; }
40637fi
40638
40639
40640  test -n "$GNM" && break
40641done
40642
40643    else
40644      # If it succeeded, then it was overridden by the user. We will use it
40645      # for the tool.
40646
40647      # First remove it from the list of overridden variables, so we can test
40648      # for unknown variables in the end.
40649      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40650
40651      # Check if we try to supply an empty value
40652      if test "x$GNM" = x; then
40653        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40654$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40655        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40656$as_echo_n "checking for GNM... " >&6; }
40657        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40658$as_echo "disabled" >&6; }
40659      else
40660        # Check if the provided tool contains a complete path.
40661        tool_specified="$GNM"
40662        tool_basename="${tool_specified##*/}"
40663        if test "x$tool_basename" = "x$tool_specified"; then
40664          # A command without a complete path is provided, search $PATH.
40665          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40666$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40667          # Extract the first word of "$tool_basename", so it can be a program name with args.
40668set dummy $tool_basename; ac_word=$2
40669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40670$as_echo_n "checking for $ac_word... " >&6; }
40671if ${ac_cv_path_GNM+:} false; then :
40672  $as_echo_n "(cached) " >&6
40673else
40674  case $GNM in
40675  [\\/]* | ?:[\\/]*)
40676  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40677  ;;
40678  *)
40679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40680for as_dir in $PATH
40681do
40682  IFS=$as_save_IFS
40683  test -z "$as_dir" && as_dir=.
40684    for ac_exec_ext in '' $ac_executable_extensions; do
40685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40686    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40688    break 2
40689  fi
40690done
40691  done
40692IFS=$as_save_IFS
40693
40694  ;;
40695esac
40696fi
40697GNM=$ac_cv_path_GNM
40698if test -n "$GNM"; then
40699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40700$as_echo "$GNM" >&6; }
40701else
40702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40703$as_echo "no" >&6; }
40704fi
40705
40706
40707          if test "x$GNM" = x; then
40708            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40709          fi
40710        else
40711          # Otherwise we believe it is a complete path. Use it as it is.
40712          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40713$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40714          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40715$as_echo_n "checking for GNM... " >&6; }
40716          if test ! -x "$tool_specified"; then
40717            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40718$as_echo "not found" >&6; }
40719            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40720          fi
40721          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40722$as_echo "$tool_specified" >&6; }
40723        fi
40724      fi
40725    fi
40726
40727  fi
40728
40729
40730
40731  # Only process if variable expands to non-empty
40732
40733  if test "x$GNM" != x; then
40734    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40735
40736  # First separate the path from the arguments. This will split at the first
40737  # space.
40738  complete="$GNM"
40739  path="${complete%% *}"
40740  tmp="$complete EOL"
40741  arguments="${tmp#* }"
40742
40743  # Input might be given as Windows format, start by converting to
40744  # unix format.
40745  new_path=`$CYGPATH -u "$path"`
40746
40747  # Now try to locate executable using which
40748  new_path=`$WHICH "$new_path" 2> /dev/null`
40749  # bat and cmd files are not always considered executable in cygwin causing which
40750  # to not find them
40751  if test "x$new_path" = x \
40752      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40753      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40754    new_path=`$CYGPATH -u "$path"`
40755  fi
40756  if test "x$new_path" = x; then
40757    # Oops. Which didn't find the executable.
40758    # The splitting of arguments from the executable at a space might have been incorrect,
40759    # since paths with space are more likely in Windows. Give it another try with the whole
40760    # argument.
40761    path="$complete"
40762    arguments="EOL"
40763    new_path=`$CYGPATH -u "$path"`
40764    new_path=`$WHICH "$new_path" 2> /dev/null`
40765    # bat and cmd files are not always considered executable in cygwin causing which
40766    # to not find them
40767    if test "x$new_path" = x \
40768        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40769        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40770      new_path=`$CYGPATH -u "$path"`
40771    fi
40772    if test "x$new_path" = x; then
40773      # It's still not found. Now this is an unrecoverable error.
40774      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40775$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40776      has_space=`$ECHO "$complete" | $GREP " "`
40777      if test "x$has_space" != x; then
40778        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40779$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40780      fi
40781      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40782    fi
40783  fi
40784
40785  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40786  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40787  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40788  # "foo.exe" is OK but "foo" is an error.
40789  #
40790  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40791  # It is also a way to make sure we got the proper file name for the real test later on.
40792  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40793  if test "x$test_shortpath" = x; then
40794    # Short path failed, file does not exist as specified.
40795    # Try adding .exe or .cmd
40796    if test -f "${new_path}.exe"; then
40797      input_to_shortpath="${new_path}.exe"
40798    elif test -f "${new_path}.cmd"; then
40799      input_to_shortpath="${new_path}.cmd"
40800    else
40801      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40802$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40803      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40804$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40805      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40806    fi
40807  else
40808    input_to_shortpath="$new_path"
40809  fi
40810
40811  # Call helper function which possibly converts this using DOS-style short mode.
40812  # If so, the updated path is stored in $new_path.
40813  new_path="$input_to_shortpath"
40814
40815  input_path="$input_to_shortpath"
40816  # Check if we need to convert this using DOS-style short mode. If the path
40817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40818  # take no chances and rewrite it.
40819  # Note: m4 eats our [], so we need to use [ and ] instead.
40820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40821  if test "x$has_forbidden_chars" != x; then
40822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40823    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40824    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40825    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40826      # Going to short mode and back again did indeed matter. Since short mode is
40827      # case insensitive, let's make it lowercase to improve readability.
40828      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40829      # Now convert it back to Unix-style (cygpath)
40830      input_path=`$CYGPATH -u "$shortmode_path"`
40831      new_path="$input_path"
40832    fi
40833  fi
40834
40835  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40836  if test "x$test_cygdrive_prefix" = x; then
40837    # As a simple fix, exclude /usr/bin since it's not a real path.
40838    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40839      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40840      # a path prefixed by /cygdrive for fixpath to work.
40841      new_path="$CYGWIN_ROOT_PATH$input_path"
40842    fi
40843  fi
40844
40845  # remove trailing .exe if any
40846  new_path="${new_path/%.exe/}"
40847
40848    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40849
40850  # First separate the path from the arguments. This will split at the first
40851  # space.
40852  complete="$GNM"
40853  path="${complete%% *}"
40854  tmp="$complete EOL"
40855  arguments="${tmp#* }"
40856
40857  # Input might be given as Windows format, start by converting to
40858  # unix format.
40859  new_path="$path"
40860
40861  windows_path="$new_path"
40862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40863    unix_path=`$CYGPATH -u "$windows_path"`
40864    new_path="$unix_path"
40865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40866    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40867    new_path="$unix_path"
40868  fi
40869
40870
40871  # Now try to locate executable using which
40872  new_path=`$WHICH "$new_path" 2> /dev/null`
40873
40874  if test "x$new_path" = x; then
40875    # Oops. Which didn't find the executable.
40876    # The splitting of arguments from the executable at a space might have been incorrect,
40877    # since paths with space are more likely in Windows. Give it another try with the whole
40878    # argument.
40879    path="$complete"
40880    arguments="EOL"
40881    new_path="$path"
40882
40883  windows_path="$new_path"
40884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40885    unix_path=`$CYGPATH -u "$windows_path"`
40886    new_path="$unix_path"
40887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40889    new_path="$unix_path"
40890  fi
40891
40892
40893    new_path=`$WHICH "$new_path" 2> /dev/null`
40894    # bat and cmd files are not always considered executable in MSYS causing which
40895    # to not find them
40896    if test "x$new_path" = x \
40897        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40898        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40899      new_path="$path"
40900
40901  windows_path="$new_path"
40902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40903    unix_path=`$CYGPATH -u "$windows_path"`
40904    new_path="$unix_path"
40905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40907    new_path="$unix_path"
40908  fi
40909
40910    fi
40911
40912    if test "x$new_path" = x; then
40913      # It's still not found. Now this is an unrecoverable error.
40914      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40915$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40916      has_space=`$ECHO "$complete" | $GREP " "`
40917      if test "x$has_space" != x; then
40918        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40919$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40920      fi
40921      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40922    fi
40923  fi
40924
40925  # Now new_path has a complete unix path to the binary
40926  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40927    # Keep paths in /bin as-is, but remove trailing .exe if any
40928    new_path="${new_path/%.exe/}"
40929    # Do not save /bin paths to all_fixpath_prefixes!
40930  else
40931    # Not in mixed or Windows style, start by that.
40932    new_path=`cmd //c echo $new_path`
40933
40934  input_path="$new_path"
40935  # Check if we need to convert this using DOS-style short mode. If the path
40936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40937  # take no chances and rewrite it.
40938  # Note: m4 eats our [], so we need to use [ and ] instead.
40939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40940  if test "x$has_forbidden_chars" != x; then
40941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40942    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40943  fi
40944
40945    # Output is in $new_path
40946
40947  windows_path="$new_path"
40948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40949    unix_path=`$CYGPATH -u "$windows_path"`
40950    new_path="$unix_path"
40951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40953    new_path="$unix_path"
40954  fi
40955
40956    # remove trailing .exe if any
40957    new_path="${new_path/%.exe/}"
40958
40959    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40960    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40961  fi
40962
40963    else
40964      # We're on a unix platform. Hooray! :)
40965      # First separate the path from the arguments. This will split at the first
40966      # space.
40967      complete="$GNM"
40968      path="${complete%% *}"
40969      tmp="$complete EOL"
40970      arguments="${tmp#* }"
40971
40972      # Cannot rely on the command "which" here since it doesn't always work.
40973      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40974      if test -z "$is_absolute_path"; then
40975        # Path to executable is not absolute. Find it.
40976        IFS_save="$IFS"
40977        IFS=:
40978        for p in $PATH; do
40979          if test -f "$p/$path" && test -x "$p/$path"; then
40980            new_path="$p/$path"
40981            break
40982          fi
40983        done
40984        IFS="$IFS_save"
40985      else
40986        # This is an absolute path, we can use it without further modifications.
40987        new_path="$path"
40988      fi
40989
40990      if test "x$new_path" = x; then
40991        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40992$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40993        has_space=`$ECHO "$complete" | $GREP " "`
40994        if test "x$has_space" != x; then
40995          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40996$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40997        fi
40998        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40999      fi
41000    fi
41001
41002    # Now join together the path and the arguments once again
41003    if test "x$arguments" != xEOL; then
41004      new_complete="$new_path ${arguments% *}"
41005    else
41006      new_complete="$new_path"
41007    fi
41008
41009    if test "x$complete" != "x$new_complete"; then
41010      GNM="$new_complete"
41011      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41012$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41013    fi
41014  fi
41015
41016  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41017    # FIXME: we should unify this with the solaris case above.
41018
41019
41020  # Publish this variable in the help.
41021
41022
41023  if [ -z "${STRIP+x}" ]; then
41024    # The variable is not set by user, try to locate tool using the code snippet
41025    if test -n "$ac_tool_prefix"; then
41026  for ac_prog in strip
41027  do
41028    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41029set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41031$as_echo_n "checking for $ac_word... " >&6; }
41032if ${ac_cv_prog_STRIP+:} false; then :
41033  $as_echo_n "(cached) " >&6
41034else
41035  if test -n "$STRIP"; then
41036  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41037else
41038as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41039for as_dir in $PATH
41040do
41041  IFS=$as_save_IFS
41042  test -z "$as_dir" && as_dir=.
41043    for ac_exec_ext in '' $ac_executable_extensions; do
41044  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41045    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41047    break 2
41048  fi
41049done
41050  done
41051IFS=$as_save_IFS
41052
41053fi
41054fi
41055STRIP=$ac_cv_prog_STRIP
41056if test -n "$STRIP"; then
41057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41058$as_echo "$STRIP" >&6; }
41059else
41060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41061$as_echo "no" >&6; }
41062fi
41063
41064
41065    test -n "$STRIP" && break
41066  done
41067fi
41068if test -z "$STRIP"; then
41069  ac_ct_STRIP=$STRIP
41070  for ac_prog in strip
41071do
41072  # Extract the first word of "$ac_prog", so it can be a program name with args.
41073set dummy $ac_prog; ac_word=$2
41074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41075$as_echo_n "checking for $ac_word... " >&6; }
41076if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41077  $as_echo_n "(cached) " >&6
41078else
41079  if test -n "$ac_ct_STRIP"; then
41080  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41081else
41082as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41083for as_dir in $PATH
41084do
41085  IFS=$as_save_IFS
41086  test -z "$as_dir" && as_dir=.
41087    for ac_exec_ext in '' $ac_executable_extensions; do
41088  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41089    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41091    break 2
41092  fi
41093done
41094  done
41095IFS=$as_save_IFS
41096
41097fi
41098fi
41099ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41100if test -n "$ac_ct_STRIP"; then
41101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41102$as_echo "$ac_ct_STRIP" >&6; }
41103else
41104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41105$as_echo "no" >&6; }
41106fi
41107
41108
41109  test -n "$ac_ct_STRIP" && break
41110done
41111
41112  if test "x$ac_ct_STRIP" = x; then
41113    STRIP=""
41114  else
41115    case $cross_compiling:$ac_tool_warned in
41116yes:)
41117{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41118$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41119ac_tool_warned=yes ;;
41120esac
41121    STRIP=$ac_ct_STRIP
41122  fi
41123fi
41124
41125  else
41126    # The variable is set, but is it from the command line or the environment?
41127
41128    # Try to remove the string !STRIP! from our list.
41129    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41130    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41131      # If it failed, the variable was not from the command line. Ignore it,
41132      # but warn the user (except for BASH, which is always set by the calling BASH).
41133      if test "xSTRIP" != xBASH; then
41134        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41135$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41136      fi
41137      # Try to locate tool using the code snippet
41138      if test -n "$ac_tool_prefix"; then
41139  for ac_prog in strip
41140  do
41141    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41142set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41144$as_echo_n "checking for $ac_word... " >&6; }
41145if ${ac_cv_prog_STRIP+:} false; then :
41146  $as_echo_n "(cached) " >&6
41147else
41148  if test -n "$STRIP"; then
41149  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41150else
41151as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41152for as_dir in $PATH
41153do
41154  IFS=$as_save_IFS
41155  test -z "$as_dir" && as_dir=.
41156    for ac_exec_ext in '' $ac_executable_extensions; do
41157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41158    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41160    break 2
41161  fi
41162done
41163  done
41164IFS=$as_save_IFS
41165
41166fi
41167fi
41168STRIP=$ac_cv_prog_STRIP
41169if test -n "$STRIP"; then
41170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41171$as_echo "$STRIP" >&6; }
41172else
41173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41174$as_echo "no" >&6; }
41175fi
41176
41177
41178    test -n "$STRIP" && break
41179  done
41180fi
41181if test -z "$STRIP"; then
41182  ac_ct_STRIP=$STRIP
41183  for ac_prog in strip
41184do
41185  # Extract the first word of "$ac_prog", so it can be a program name with args.
41186set dummy $ac_prog; ac_word=$2
41187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41188$as_echo_n "checking for $ac_word... " >&6; }
41189if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41190  $as_echo_n "(cached) " >&6
41191else
41192  if test -n "$ac_ct_STRIP"; then
41193  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41194else
41195as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41196for as_dir in $PATH
41197do
41198  IFS=$as_save_IFS
41199  test -z "$as_dir" && as_dir=.
41200    for ac_exec_ext in '' $ac_executable_extensions; do
41201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41202    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41204    break 2
41205  fi
41206done
41207  done
41208IFS=$as_save_IFS
41209
41210fi
41211fi
41212ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41213if test -n "$ac_ct_STRIP"; then
41214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41215$as_echo "$ac_ct_STRIP" >&6; }
41216else
41217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41218$as_echo "no" >&6; }
41219fi
41220
41221
41222  test -n "$ac_ct_STRIP" && break
41223done
41224
41225  if test "x$ac_ct_STRIP" = x; then
41226    STRIP=""
41227  else
41228    case $cross_compiling:$ac_tool_warned in
41229yes:)
41230{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41231$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41232ac_tool_warned=yes ;;
41233esac
41234    STRIP=$ac_ct_STRIP
41235  fi
41236fi
41237
41238    else
41239      # If it succeeded, then it was overridden by the user. We will use it
41240      # for the tool.
41241
41242      # First remove it from the list of overridden variables, so we can test
41243      # for unknown variables in the end.
41244      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41245
41246      # Check if we try to supply an empty value
41247      if test "x$STRIP" = x; then
41248        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41249$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41250        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41251$as_echo_n "checking for STRIP... " >&6; }
41252        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41253$as_echo "disabled" >&6; }
41254      else
41255        # Check if the provided tool contains a complete path.
41256        tool_specified="$STRIP"
41257        tool_basename="${tool_specified##*/}"
41258        if test "x$tool_basename" = "x$tool_specified"; then
41259          # A command without a complete path is provided, search $PATH.
41260          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41261$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41262          # Extract the first word of "$tool_basename", so it can be a program name with args.
41263set dummy $tool_basename; ac_word=$2
41264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41265$as_echo_n "checking for $ac_word... " >&6; }
41266if ${ac_cv_path_STRIP+:} false; then :
41267  $as_echo_n "(cached) " >&6
41268else
41269  case $STRIP in
41270  [\\/]* | ?:[\\/]*)
41271  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41272  ;;
41273  *)
41274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41275for as_dir in $PATH
41276do
41277  IFS=$as_save_IFS
41278  test -z "$as_dir" && as_dir=.
41279    for ac_exec_ext in '' $ac_executable_extensions; do
41280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41281    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41283    break 2
41284  fi
41285done
41286  done
41287IFS=$as_save_IFS
41288
41289  ;;
41290esac
41291fi
41292STRIP=$ac_cv_path_STRIP
41293if test -n "$STRIP"; then
41294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41295$as_echo "$STRIP" >&6; }
41296else
41297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41298$as_echo "no" >&6; }
41299fi
41300
41301
41302          if test "x$STRIP" = x; then
41303            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41304          fi
41305        else
41306          # Otherwise we believe it is a complete path. Use it as it is.
41307          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41308$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41309          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41310$as_echo_n "checking for STRIP... " >&6; }
41311          if test ! -x "$tool_specified"; then
41312            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41313$as_echo "not found" >&6; }
41314            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41315          fi
41316          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41317$as_echo "$tool_specified" >&6; }
41318        fi
41319      fi
41320    fi
41321
41322  fi
41323
41324
41325
41326  # Only process if variable expands to non-empty
41327
41328  if test "x$STRIP" != x; then
41329    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41330
41331  # First separate the path from the arguments. This will split at the first
41332  # space.
41333  complete="$STRIP"
41334  path="${complete%% *}"
41335  tmp="$complete EOL"
41336  arguments="${tmp#* }"
41337
41338  # Input might be given as Windows format, start by converting to
41339  # unix format.
41340  new_path=`$CYGPATH -u "$path"`
41341
41342  # Now try to locate executable using which
41343  new_path=`$WHICH "$new_path" 2> /dev/null`
41344  # bat and cmd files are not always considered executable in cygwin causing which
41345  # to not find them
41346  if test "x$new_path" = x \
41347      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41348      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41349    new_path=`$CYGPATH -u "$path"`
41350  fi
41351  if test "x$new_path" = x; then
41352    # Oops. Which didn't find the executable.
41353    # The splitting of arguments from the executable at a space might have been incorrect,
41354    # since paths with space are more likely in Windows. Give it another try with the whole
41355    # argument.
41356    path="$complete"
41357    arguments="EOL"
41358    new_path=`$CYGPATH -u "$path"`
41359    new_path=`$WHICH "$new_path" 2> /dev/null`
41360    # bat and cmd files are not always considered executable in cygwin causing which
41361    # to not find them
41362    if test "x$new_path" = x \
41363        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41364        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41365      new_path=`$CYGPATH -u "$path"`
41366    fi
41367    if test "x$new_path" = x; then
41368      # It's still not found. Now this is an unrecoverable error.
41369      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41370$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41371      has_space=`$ECHO "$complete" | $GREP " "`
41372      if test "x$has_space" != x; then
41373        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41374$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41375      fi
41376      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41377    fi
41378  fi
41379
41380  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41381  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41382  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41383  # "foo.exe" is OK but "foo" is an error.
41384  #
41385  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41386  # It is also a way to make sure we got the proper file name for the real test later on.
41387  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41388  if test "x$test_shortpath" = x; then
41389    # Short path failed, file does not exist as specified.
41390    # Try adding .exe or .cmd
41391    if test -f "${new_path}.exe"; then
41392      input_to_shortpath="${new_path}.exe"
41393    elif test -f "${new_path}.cmd"; then
41394      input_to_shortpath="${new_path}.cmd"
41395    else
41396      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41397$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41398      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41399$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41400      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41401    fi
41402  else
41403    input_to_shortpath="$new_path"
41404  fi
41405
41406  # Call helper function which possibly converts this using DOS-style short mode.
41407  # If so, the updated path is stored in $new_path.
41408  new_path="$input_to_shortpath"
41409
41410  input_path="$input_to_shortpath"
41411  # Check if we need to convert this using DOS-style short mode. If the path
41412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41413  # take no chances and rewrite it.
41414  # Note: m4 eats our [], so we need to use [ and ] instead.
41415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41416  if test "x$has_forbidden_chars" != x; then
41417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41418    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41419    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41420    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41421      # Going to short mode and back again did indeed matter. Since short mode is
41422      # case insensitive, let's make it lowercase to improve readability.
41423      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41424      # Now convert it back to Unix-style (cygpath)
41425      input_path=`$CYGPATH -u "$shortmode_path"`
41426      new_path="$input_path"
41427    fi
41428  fi
41429
41430  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41431  if test "x$test_cygdrive_prefix" = x; then
41432    # As a simple fix, exclude /usr/bin since it's not a real path.
41433    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41434      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41435      # a path prefixed by /cygdrive for fixpath to work.
41436      new_path="$CYGWIN_ROOT_PATH$input_path"
41437    fi
41438  fi
41439
41440  # remove trailing .exe if any
41441  new_path="${new_path/%.exe/}"
41442
41443    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41444
41445  # First separate the path from the arguments. This will split at the first
41446  # space.
41447  complete="$STRIP"
41448  path="${complete%% *}"
41449  tmp="$complete EOL"
41450  arguments="${tmp#* }"
41451
41452  # Input might be given as Windows format, start by converting to
41453  # unix format.
41454  new_path="$path"
41455
41456  windows_path="$new_path"
41457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41458    unix_path=`$CYGPATH -u "$windows_path"`
41459    new_path="$unix_path"
41460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41462    new_path="$unix_path"
41463  fi
41464
41465
41466  # Now try to locate executable using which
41467  new_path=`$WHICH "$new_path" 2> /dev/null`
41468
41469  if test "x$new_path" = x; then
41470    # Oops. Which didn't find the executable.
41471    # The splitting of arguments from the executable at a space might have been incorrect,
41472    # since paths with space are more likely in Windows. Give it another try with the whole
41473    # argument.
41474    path="$complete"
41475    arguments="EOL"
41476    new_path="$path"
41477
41478  windows_path="$new_path"
41479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41480    unix_path=`$CYGPATH -u "$windows_path"`
41481    new_path="$unix_path"
41482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41483    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41484    new_path="$unix_path"
41485  fi
41486
41487
41488    new_path=`$WHICH "$new_path" 2> /dev/null`
41489    # bat and cmd files are not always considered executable in MSYS causing which
41490    # to not find them
41491    if test "x$new_path" = x \
41492        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41493        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41494      new_path="$path"
41495
41496  windows_path="$new_path"
41497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41498    unix_path=`$CYGPATH -u "$windows_path"`
41499    new_path="$unix_path"
41500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41501    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41502    new_path="$unix_path"
41503  fi
41504
41505    fi
41506
41507    if test "x$new_path" = x; then
41508      # It's still not found. Now this is an unrecoverable error.
41509      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41510$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41511      has_space=`$ECHO "$complete" | $GREP " "`
41512      if test "x$has_space" != x; then
41513        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41514$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41515      fi
41516      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41517    fi
41518  fi
41519
41520  # Now new_path has a complete unix path to the binary
41521  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41522    # Keep paths in /bin as-is, but remove trailing .exe if any
41523    new_path="${new_path/%.exe/}"
41524    # Do not save /bin paths to all_fixpath_prefixes!
41525  else
41526    # Not in mixed or Windows style, start by that.
41527    new_path=`cmd //c echo $new_path`
41528
41529  input_path="$new_path"
41530  # Check if we need to convert this using DOS-style short mode. If the path
41531  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41532  # take no chances and rewrite it.
41533  # Note: m4 eats our [], so we need to use [ and ] instead.
41534  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41535  if test "x$has_forbidden_chars" != x; then
41536    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41537    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41538  fi
41539
41540    # Output is in $new_path
41541
41542  windows_path="$new_path"
41543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41544    unix_path=`$CYGPATH -u "$windows_path"`
41545    new_path="$unix_path"
41546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41547    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41548    new_path="$unix_path"
41549  fi
41550
41551    # remove trailing .exe if any
41552    new_path="${new_path/%.exe/}"
41553
41554    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41555    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41556  fi
41557
41558    else
41559      # We're on a unix platform. Hooray! :)
41560      # First separate the path from the arguments. This will split at the first
41561      # space.
41562      complete="$STRIP"
41563      path="${complete%% *}"
41564      tmp="$complete EOL"
41565      arguments="${tmp#* }"
41566
41567      # Cannot rely on the command "which" here since it doesn't always work.
41568      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41569      if test -z "$is_absolute_path"; then
41570        # Path to executable is not absolute. Find it.
41571        IFS_save="$IFS"
41572        IFS=:
41573        for p in $PATH; do
41574          if test -f "$p/$path" && test -x "$p/$path"; then
41575            new_path="$p/$path"
41576            break
41577          fi
41578        done
41579        IFS="$IFS_save"
41580      else
41581        # This is an absolute path, we can use it without further modifications.
41582        new_path="$path"
41583      fi
41584
41585      if test "x$new_path" = x; then
41586        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41587$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41588        has_space=`$ECHO "$complete" | $GREP " "`
41589        if test "x$has_space" != x; then
41590          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41591$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41592        fi
41593        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41594      fi
41595    fi
41596
41597    # Now join together the path and the arguments once again
41598    if test "x$arguments" != xEOL; then
41599      new_complete="$new_path ${arguments% *}"
41600    else
41601      new_complete="$new_path"
41602    fi
41603
41604    if test "x$complete" != "x$new_complete"; then
41605      STRIP="$new_complete"
41606      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41607$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41608    fi
41609  fi
41610
41611    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41612
41613
41614  # Publish this variable in the help.
41615
41616
41617  if [ -z "${NM+x}" ]; then
41618    # The variable is not set by user, try to locate tool using the code snippet
41619    if test -n "$ac_tool_prefix"; then
41620  for ac_prog in nm gcc-nm
41621  do
41622    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41623set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41625$as_echo_n "checking for $ac_word... " >&6; }
41626if ${ac_cv_prog_NM+:} false; then :
41627  $as_echo_n "(cached) " >&6
41628else
41629  if test -n "$NM"; then
41630  ac_cv_prog_NM="$NM" # Let the user override the test.
41631else
41632as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41633for as_dir in $PATH
41634do
41635  IFS=$as_save_IFS
41636  test -z "$as_dir" && as_dir=.
41637    for ac_exec_ext in '' $ac_executable_extensions; do
41638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41639    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41641    break 2
41642  fi
41643done
41644  done
41645IFS=$as_save_IFS
41646
41647fi
41648fi
41649NM=$ac_cv_prog_NM
41650if test -n "$NM"; then
41651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41652$as_echo "$NM" >&6; }
41653else
41654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41655$as_echo "no" >&6; }
41656fi
41657
41658
41659    test -n "$NM" && break
41660  done
41661fi
41662if test -z "$NM"; then
41663  ac_ct_NM=$NM
41664  for ac_prog in nm gcc-nm
41665do
41666  # Extract the first word of "$ac_prog", so it can be a program name with args.
41667set dummy $ac_prog; ac_word=$2
41668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41669$as_echo_n "checking for $ac_word... " >&6; }
41670if ${ac_cv_prog_ac_ct_NM+:} false; then :
41671  $as_echo_n "(cached) " >&6
41672else
41673  if test -n "$ac_ct_NM"; then
41674  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41675else
41676as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41677for as_dir in $PATH
41678do
41679  IFS=$as_save_IFS
41680  test -z "$as_dir" && as_dir=.
41681    for ac_exec_ext in '' $ac_executable_extensions; do
41682  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41683    ac_cv_prog_ac_ct_NM="$ac_prog"
41684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41685    break 2
41686  fi
41687done
41688  done
41689IFS=$as_save_IFS
41690
41691fi
41692fi
41693ac_ct_NM=$ac_cv_prog_ac_ct_NM
41694if test -n "$ac_ct_NM"; then
41695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41696$as_echo "$ac_ct_NM" >&6; }
41697else
41698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41699$as_echo "no" >&6; }
41700fi
41701
41702
41703  test -n "$ac_ct_NM" && break
41704done
41705
41706  if test "x$ac_ct_NM" = x; then
41707    NM=""
41708  else
41709    case $cross_compiling:$ac_tool_warned in
41710yes:)
41711{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41712$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41713ac_tool_warned=yes ;;
41714esac
41715    NM=$ac_ct_NM
41716  fi
41717fi
41718
41719  else
41720    # The variable is set, but is it from the command line or the environment?
41721
41722    # Try to remove the string !NM! from our list.
41723    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41724    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41725      # If it failed, the variable was not from the command line. Ignore it,
41726      # but warn the user (except for BASH, which is always set by the calling BASH).
41727      if test "xNM" != xBASH; then
41728        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41729$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41730      fi
41731      # Try to locate tool using the code snippet
41732      if test -n "$ac_tool_prefix"; then
41733  for ac_prog in nm gcc-nm
41734  do
41735    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41736set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41738$as_echo_n "checking for $ac_word... " >&6; }
41739if ${ac_cv_prog_NM+:} false; then :
41740  $as_echo_n "(cached) " >&6
41741else
41742  if test -n "$NM"; then
41743  ac_cv_prog_NM="$NM" # Let the user override the test.
41744else
41745as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41746for as_dir in $PATH
41747do
41748  IFS=$as_save_IFS
41749  test -z "$as_dir" && as_dir=.
41750    for ac_exec_ext in '' $ac_executable_extensions; do
41751  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41752    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41753    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41754    break 2
41755  fi
41756done
41757  done
41758IFS=$as_save_IFS
41759
41760fi
41761fi
41762NM=$ac_cv_prog_NM
41763if test -n "$NM"; then
41764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41765$as_echo "$NM" >&6; }
41766else
41767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41768$as_echo "no" >&6; }
41769fi
41770
41771
41772    test -n "$NM" && break
41773  done
41774fi
41775if test -z "$NM"; then
41776  ac_ct_NM=$NM
41777  for ac_prog in nm gcc-nm
41778do
41779  # Extract the first word of "$ac_prog", so it can be a program name with args.
41780set dummy $ac_prog; ac_word=$2
41781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41782$as_echo_n "checking for $ac_word... " >&6; }
41783if ${ac_cv_prog_ac_ct_NM+:} false; then :
41784  $as_echo_n "(cached) " >&6
41785else
41786  if test -n "$ac_ct_NM"; then
41787  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41788else
41789as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41790for as_dir in $PATH
41791do
41792  IFS=$as_save_IFS
41793  test -z "$as_dir" && as_dir=.
41794    for ac_exec_ext in '' $ac_executable_extensions; do
41795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41796    ac_cv_prog_ac_ct_NM="$ac_prog"
41797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41798    break 2
41799  fi
41800done
41801  done
41802IFS=$as_save_IFS
41803
41804fi
41805fi
41806ac_ct_NM=$ac_cv_prog_ac_ct_NM
41807if test -n "$ac_ct_NM"; then
41808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41809$as_echo "$ac_ct_NM" >&6; }
41810else
41811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41812$as_echo "no" >&6; }
41813fi
41814
41815
41816  test -n "$ac_ct_NM" && break
41817done
41818
41819  if test "x$ac_ct_NM" = x; then
41820    NM=""
41821  else
41822    case $cross_compiling:$ac_tool_warned in
41823yes:)
41824{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41825$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41826ac_tool_warned=yes ;;
41827esac
41828    NM=$ac_ct_NM
41829  fi
41830fi
41831
41832    else
41833      # If it succeeded, then it was overridden by the user. We will use it
41834      # for the tool.
41835
41836      # First remove it from the list of overridden variables, so we can test
41837      # for unknown variables in the end.
41838      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41839
41840      # Check if we try to supply an empty value
41841      if test "x$NM" = x; then
41842        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41843$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41844        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41845$as_echo_n "checking for NM... " >&6; }
41846        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41847$as_echo "disabled" >&6; }
41848      else
41849        # Check if the provided tool contains a complete path.
41850        tool_specified="$NM"
41851        tool_basename="${tool_specified##*/}"
41852        if test "x$tool_basename" = "x$tool_specified"; then
41853          # A command without a complete path is provided, search $PATH.
41854          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41855$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41856          # Extract the first word of "$tool_basename", so it can be a program name with args.
41857set dummy $tool_basename; ac_word=$2
41858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41859$as_echo_n "checking for $ac_word... " >&6; }
41860if ${ac_cv_path_NM+:} false; then :
41861  $as_echo_n "(cached) " >&6
41862else
41863  case $NM in
41864  [\\/]* | ?:[\\/]*)
41865  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41866  ;;
41867  *)
41868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41869for as_dir in $PATH
41870do
41871  IFS=$as_save_IFS
41872  test -z "$as_dir" && as_dir=.
41873    for ac_exec_ext in '' $ac_executable_extensions; do
41874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41875    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41877    break 2
41878  fi
41879done
41880  done
41881IFS=$as_save_IFS
41882
41883  ;;
41884esac
41885fi
41886NM=$ac_cv_path_NM
41887if test -n "$NM"; then
41888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41889$as_echo "$NM" >&6; }
41890else
41891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41892$as_echo "no" >&6; }
41893fi
41894
41895
41896          if test "x$NM" = x; then
41897            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41898          fi
41899        else
41900          # Otherwise we believe it is a complete path. Use it as it is.
41901          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41902$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41903          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41904$as_echo_n "checking for NM... " >&6; }
41905          if test ! -x "$tool_specified"; then
41906            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41907$as_echo "not found" >&6; }
41908            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41909          fi
41910          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41911$as_echo "$tool_specified" >&6; }
41912        fi
41913      fi
41914    fi
41915
41916  fi
41917
41918
41919    else
41920
41921
41922  # Publish this variable in the help.
41923
41924
41925  if [ -z "${NM+x}" ]; then
41926    # The variable is not set by user, try to locate tool using the code snippet
41927    if test -n "$ac_tool_prefix"; then
41928  for ac_prog in nm
41929  do
41930    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41931set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41933$as_echo_n "checking for $ac_word... " >&6; }
41934if ${ac_cv_prog_NM+:} false; then :
41935  $as_echo_n "(cached) " >&6
41936else
41937  if test -n "$NM"; then
41938  ac_cv_prog_NM="$NM" # Let the user override the test.
41939else
41940as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41941for as_dir in $PATH
41942do
41943  IFS=$as_save_IFS
41944  test -z "$as_dir" && as_dir=.
41945    for ac_exec_ext in '' $ac_executable_extensions; do
41946  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41947    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41948    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41949    break 2
41950  fi
41951done
41952  done
41953IFS=$as_save_IFS
41954
41955fi
41956fi
41957NM=$ac_cv_prog_NM
41958if test -n "$NM"; then
41959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41960$as_echo "$NM" >&6; }
41961else
41962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41963$as_echo "no" >&6; }
41964fi
41965
41966
41967    test -n "$NM" && break
41968  done
41969fi
41970if test -z "$NM"; then
41971  ac_ct_NM=$NM
41972  for ac_prog in nm
41973do
41974  # Extract the first word of "$ac_prog", so it can be a program name with args.
41975set dummy $ac_prog; ac_word=$2
41976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41977$as_echo_n "checking for $ac_word... " >&6; }
41978if ${ac_cv_prog_ac_ct_NM+:} false; then :
41979  $as_echo_n "(cached) " >&6
41980else
41981  if test -n "$ac_ct_NM"; then
41982  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41983else
41984as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41985for as_dir in $PATH
41986do
41987  IFS=$as_save_IFS
41988  test -z "$as_dir" && as_dir=.
41989    for ac_exec_ext in '' $ac_executable_extensions; do
41990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41991    ac_cv_prog_ac_ct_NM="$ac_prog"
41992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41993    break 2
41994  fi
41995done
41996  done
41997IFS=$as_save_IFS
41998
41999fi
42000fi
42001ac_ct_NM=$ac_cv_prog_ac_ct_NM
42002if test -n "$ac_ct_NM"; then
42003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42004$as_echo "$ac_ct_NM" >&6; }
42005else
42006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42007$as_echo "no" >&6; }
42008fi
42009
42010
42011  test -n "$ac_ct_NM" && break
42012done
42013
42014  if test "x$ac_ct_NM" = x; then
42015    NM=""
42016  else
42017    case $cross_compiling:$ac_tool_warned in
42018yes:)
42019{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42020$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42021ac_tool_warned=yes ;;
42022esac
42023    NM=$ac_ct_NM
42024  fi
42025fi
42026
42027  else
42028    # The variable is set, but is it from the command line or the environment?
42029
42030    # Try to remove the string !NM! from our list.
42031    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42032    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42033      # If it failed, the variable was not from the command line. Ignore it,
42034      # but warn the user (except for BASH, which is always set by the calling BASH).
42035      if test "xNM" != xBASH; then
42036        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42037$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42038      fi
42039      # Try to locate tool using the code snippet
42040      if test -n "$ac_tool_prefix"; then
42041  for ac_prog in nm
42042  do
42043    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42044set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42046$as_echo_n "checking for $ac_word... " >&6; }
42047if ${ac_cv_prog_NM+:} false; then :
42048  $as_echo_n "(cached) " >&6
42049else
42050  if test -n "$NM"; then
42051  ac_cv_prog_NM="$NM" # Let the user override the test.
42052else
42053as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42054for as_dir in $PATH
42055do
42056  IFS=$as_save_IFS
42057  test -z "$as_dir" && as_dir=.
42058    for ac_exec_ext in '' $ac_executable_extensions; do
42059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42060    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42062    break 2
42063  fi
42064done
42065  done
42066IFS=$as_save_IFS
42067
42068fi
42069fi
42070NM=$ac_cv_prog_NM
42071if test -n "$NM"; then
42072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42073$as_echo "$NM" >&6; }
42074else
42075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42076$as_echo "no" >&6; }
42077fi
42078
42079
42080    test -n "$NM" && break
42081  done
42082fi
42083if test -z "$NM"; then
42084  ac_ct_NM=$NM
42085  for ac_prog in nm
42086do
42087  # Extract the first word of "$ac_prog", so it can be a program name with args.
42088set dummy $ac_prog; ac_word=$2
42089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42090$as_echo_n "checking for $ac_word... " >&6; }
42091if ${ac_cv_prog_ac_ct_NM+:} false; then :
42092  $as_echo_n "(cached) " >&6
42093else
42094  if test -n "$ac_ct_NM"; then
42095  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42096else
42097as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42098for as_dir in $PATH
42099do
42100  IFS=$as_save_IFS
42101  test -z "$as_dir" && as_dir=.
42102    for ac_exec_ext in '' $ac_executable_extensions; do
42103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42104    ac_cv_prog_ac_ct_NM="$ac_prog"
42105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42106    break 2
42107  fi
42108done
42109  done
42110IFS=$as_save_IFS
42111
42112fi
42113fi
42114ac_ct_NM=$ac_cv_prog_ac_ct_NM
42115if test -n "$ac_ct_NM"; then
42116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42117$as_echo "$ac_ct_NM" >&6; }
42118else
42119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42120$as_echo "no" >&6; }
42121fi
42122
42123
42124  test -n "$ac_ct_NM" && break
42125done
42126
42127  if test "x$ac_ct_NM" = x; then
42128    NM=""
42129  else
42130    case $cross_compiling:$ac_tool_warned in
42131yes:)
42132{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42133$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42134ac_tool_warned=yes ;;
42135esac
42136    NM=$ac_ct_NM
42137  fi
42138fi
42139
42140    else
42141      # If it succeeded, then it was overridden by the user. We will use it
42142      # for the tool.
42143
42144      # First remove it from the list of overridden variables, so we can test
42145      # for unknown variables in the end.
42146      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42147
42148      # Check if we try to supply an empty value
42149      if test "x$NM" = x; then
42150        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42151$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42152        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42153$as_echo_n "checking for NM... " >&6; }
42154        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42155$as_echo "disabled" >&6; }
42156      else
42157        # Check if the provided tool contains a complete path.
42158        tool_specified="$NM"
42159        tool_basename="${tool_specified##*/}"
42160        if test "x$tool_basename" = "x$tool_specified"; then
42161          # A command without a complete path is provided, search $PATH.
42162          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42163$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42164          # Extract the first word of "$tool_basename", so it can be a program name with args.
42165set dummy $tool_basename; ac_word=$2
42166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42167$as_echo_n "checking for $ac_word... " >&6; }
42168if ${ac_cv_path_NM+:} false; then :
42169  $as_echo_n "(cached) " >&6
42170else
42171  case $NM in
42172  [\\/]* | ?:[\\/]*)
42173  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42174  ;;
42175  *)
42176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42177for as_dir in $PATH
42178do
42179  IFS=$as_save_IFS
42180  test -z "$as_dir" && as_dir=.
42181    for ac_exec_ext in '' $ac_executable_extensions; do
42182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42183    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42185    break 2
42186  fi
42187done
42188  done
42189IFS=$as_save_IFS
42190
42191  ;;
42192esac
42193fi
42194NM=$ac_cv_path_NM
42195if test -n "$NM"; then
42196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42197$as_echo "$NM" >&6; }
42198else
42199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42200$as_echo "no" >&6; }
42201fi
42202
42203
42204          if test "x$NM" = x; then
42205            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42206          fi
42207        else
42208          # Otherwise we believe it is a complete path. Use it as it is.
42209          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42210$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42211          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42212$as_echo_n "checking for NM... " >&6; }
42213          if test ! -x "$tool_specified"; then
42214            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42215$as_echo "not found" >&6; }
42216            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42217          fi
42218          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42219$as_echo "$tool_specified" >&6; }
42220        fi
42221      fi
42222    fi
42223
42224  fi
42225
42226
42227    fi
42228
42229  # Only process if variable expands to non-empty
42230
42231  if test "x$NM" != x; then
42232    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42233
42234  # First separate the path from the arguments. This will split at the first
42235  # space.
42236  complete="$NM"
42237  path="${complete%% *}"
42238  tmp="$complete EOL"
42239  arguments="${tmp#* }"
42240
42241  # Input might be given as Windows format, start by converting to
42242  # unix format.
42243  new_path=`$CYGPATH -u "$path"`
42244
42245  # Now try to locate executable using which
42246  new_path=`$WHICH "$new_path" 2> /dev/null`
42247  # bat and cmd files are not always considered executable in cygwin causing which
42248  # to not find them
42249  if test "x$new_path" = x \
42250      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42251      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42252    new_path=`$CYGPATH -u "$path"`
42253  fi
42254  if test "x$new_path" = x; then
42255    # Oops. Which didn't find the executable.
42256    # The splitting of arguments from the executable at a space might have been incorrect,
42257    # since paths with space are more likely in Windows. Give it another try with the whole
42258    # argument.
42259    path="$complete"
42260    arguments="EOL"
42261    new_path=`$CYGPATH -u "$path"`
42262    new_path=`$WHICH "$new_path" 2> /dev/null`
42263    # bat and cmd files are not always considered executable in cygwin causing which
42264    # to not find them
42265    if test "x$new_path" = x \
42266        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42267        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42268      new_path=`$CYGPATH -u "$path"`
42269    fi
42270    if test "x$new_path" = x; then
42271      # It's still not found. Now this is an unrecoverable error.
42272      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42273$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42274      has_space=`$ECHO "$complete" | $GREP " "`
42275      if test "x$has_space" != x; then
42276        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42277$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42278      fi
42279      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42280    fi
42281  fi
42282
42283  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42284  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42285  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42286  # "foo.exe" is OK but "foo" is an error.
42287  #
42288  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42289  # It is also a way to make sure we got the proper file name for the real test later on.
42290  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42291  if test "x$test_shortpath" = x; then
42292    # Short path failed, file does not exist as specified.
42293    # Try adding .exe or .cmd
42294    if test -f "${new_path}.exe"; then
42295      input_to_shortpath="${new_path}.exe"
42296    elif test -f "${new_path}.cmd"; then
42297      input_to_shortpath="${new_path}.cmd"
42298    else
42299      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42300$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42301      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42302$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42303      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42304    fi
42305  else
42306    input_to_shortpath="$new_path"
42307  fi
42308
42309  # Call helper function which possibly converts this using DOS-style short mode.
42310  # If so, the updated path is stored in $new_path.
42311  new_path="$input_to_shortpath"
42312
42313  input_path="$input_to_shortpath"
42314  # Check if we need to convert this using DOS-style short mode. If the path
42315  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42316  # take no chances and rewrite it.
42317  # Note: m4 eats our [], so we need to use [ and ] instead.
42318  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42319  if test "x$has_forbidden_chars" != x; then
42320    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42321    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42322    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42323    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42324      # Going to short mode and back again did indeed matter. Since short mode is
42325      # case insensitive, let's make it lowercase to improve readability.
42326      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42327      # Now convert it back to Unix-style (cygpath)
42328      input_path=`$CYGPATH -u "$shortmode_path"`
42329      new_path="$input_path"
42330    fi
42331  fi
42332
42333  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42334  if test "x$test_cygdrive_prefix" = x; then
42335    # As a simple fix, exclude /usr/bin since it's not a real path.
42336    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42337      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42338      # a path prefixed by /cygdrive for fixpath to work.
42339      new_path="$CYGWIN_ROOT_PATH$input_path"
42340    fi
42341  fi
42342
42343  # remove trailing .exe if any
42344  new_path="${new_path/%.exe/}"
42345
42346    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42347
42348  # First separate the path from the arguments. This will split at the first
42349  # space.
42350  complete="$NM"
42351  path="${complete%% *}"
42352  tmp="$complete EOL"
42353  arguments="${tmp#* }"
42354
42355  # Input might be given as Windows format, start by converting to
42356  # unix format.
42357  new_path="$path"
42358
42359  windows_path="$new_path"
42360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42361    unix_path=`$CYGPATH -u "$windows_path"`
42362    new_path="$unix_path"
42363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42365    new_path="$unix_path"
42366  fi
42367
42368
42369  # Now try to locate executable using which
42370  new_path=`$WHICH "$new_path" 2> /dev/null`
42371
42372  if test "x$new_path" = x; then
42373    # Oops. Which didn't find the executable.
42374    # The splitting of arguments from the executable at a space might have been incorrect,
42375    # since paths with space are more likely in Windows. Give it another try with the whole
42376    # argument.
42377    path="$complete"
42378    arguments="EOL"
42379    new_path="$path"
42380
42381  windows_path="$new_path"
42382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42383    unix_path=`$CYGPATH -u "$windows_path"`
42384    new_path="$unix_path"
42385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42387    new_path="$unix_path"
42388  fi
42389
42390
42391    new_path=`$WHICH "$new_path" 2> /dev/null`
42392    # bat and cmd files are not always considered executable in MSYS causing which
42393    # to not find them
42394    if test "x$new_path" = x \
42395        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42396        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42397      new_path="$path"
42398
42399  windows_path="$new_path"
42400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42401    unix_path=`$CYGPATH -u "$windows_path"`
42402    new_path="$unix_path"
42403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42405    new_path="$unix_path"
42406  fi
42407
42408    fi
42409
42410    if test "x$new_path" = x; then
42411      # It's still not found. Now this is an unrecoverable error.
42412      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42413$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42414      has_space=`$ECHO "$complete" | $GREP " "`
42415      if test "x$has_space" != x; then
42416        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42417$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42418      fi
42419      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42420    fi
42421  fi
42422
42423  # Now new_path has a complete unix path to the binary
42424  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42425    # Keep paths in /bin as-is, but remove trailing .exe if any
42426    new_path="${new_path/%.exe/}"
42427    # Do not save /bin paths to all_fixpath_prefixes!
42428  else
42429    # Not in mixed or Windows style, start by that.
42430    new_path=`cmd //c echo $new_path`
42431
42432  input_path="$new_path"
42433  # Check if we need to convert this using DOS-style short mode. If the path
42434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42435  # take no chances and rewrite it.
42436  # Note: m4 eats our [], so we need to use [ and ] instead.
42437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42438  if test "x$has_forbidden_chars" != x; then
42439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42440    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42441  fi
42442
42443    # Output is in $new_path
42444
42445  windows_path="$new_path"
42446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42447    unix_path=`$CYGPATH -u "$windows_path"`
42448    new_path="$unix_path"
42449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42451    new_path="$unix_path"
42452  fi
42453
42454    # remove trailing .exe if any
42455    new_path="${new_path/%.exe/}"
42456
42457    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42458    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42459  fi
42460
42461    else
42462      # We're on a unix platform. Hooray! :)
42463      # First separate the path from the arguments. This will split at the first
42464      # space.
42465      complete="$NM"
42466      path="${complete%% *}"
42467      tmp="$complete EOL"
42468      arguments="${tmp#* }"
42469
42470      # Cannot rely on the command "which" here since it doesn't always work.
42471      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42472      if test -z "$is_absolute_path"; then
42473        # Path to executable is not absolute. Find it.
42474        IFS_save="$IFS"
42475        IFS=:
42476        for p in $PATH; do
42477          if test -f "$p/$path" && test -x "$p/$path"; then
42478            new_path="$p/$path"
42479            break
42480          fi
42481        done
42482        IFS="$IFS_save"
42483      else
42484        # This is an absolute path, we can use it without further modifications.
42485        new_path="$path"
42486      fi
42487
42488      if test "x$new_path" = x; then
42489        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42490$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42491        has_space=`$ECHO "$complete" | $GREP " "`
42492        if test "x$has_space" != x; then
42493          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42494$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42495        fi
42496        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42497      fi
42498    fi
42499
42500    # Now join together the path and the arguments once again
42501    if test "x$arguments" != xEOL; then
42502      new_complete="$new_path ${arguments% *}"
42503    else
42504      new_complete="$new_path"
42505    fi
42506
42507    if test "x$complete" != "x$new_complete"; then
42508      NM="$new_complete"
42509      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42510$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42511    fi
42512  fi
42513
42514    GNM="$NM"
42515
42516  fi
42517
42518  # objcopy is used for moving debug symbols to separate files when
42519  # full debug symbols are enabled.
42520  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42521
42522
42523  # Publish this variable in the help.
42524
42525
42526  if [ -z "${OBJCOPY+x}" ]; then
42527    # The variable is not set by user, try to locate tool using the code snippet
42528    if test -n "$ac_tool_prefix"; then
42529  for ac_prog in gobjcopy objcopy
42530  do
42531    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42532set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42534$as_echo_n "checking for $ac_word... " >&6; }
42535if ${ac_cv_prog_OBJCOPY+:} false; then :
42536  $as_echo_n "(cached) " >&6
42537else
42538  if test -n "$OBJCOPY"; then
42539  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42540else
42541as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42542for as_dir in $PATH
42543do
42544  IFS=$as_save_IFS
42545  test -z "$as_dir" && as_dir=.
42546    for ac_exec_ext in '' $ac_executable_extensions; do
42547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42548    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42550    break 2
42551  fi
42552done
42553  done
42554IFS=$as_save_IFS
42555
42556fi
42557fi
42558OBJCOPY=$ac_cv_prog_OBJCOPY
42559if test -n "$OBJCOPY"; then
42560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42561$as_echo "$OBJCOPY" >&6; }
42562else
42563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42564$as_echo "no" >&6; }
42565fi
42566
42567
42568    test -n "$OBJCOPY" && break
42569  done
42570fi
42571if test -z "$OBJCOPY"; then
42572  ac_ct_OBJCOPY=$OBJCOPY
42573  for ac_prog in gobjcopy objcopy
42574do
42575  # Extract the first word of "$ac_prog", so it can be a program name with args.
42576set dummy $ac_prog; ac_word=$2
42577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42578$as_echo_n "checking for $ac_word... " >&6; }
42579if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42580  $as_echo_n "(cached) " >&6
42581else
42582  if test -n "$ac_ct_OBJCOPY"; then
42583  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42584else
42585as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42586for as_dir in $PATH
42587do
42588  IFS=$as_save_IFS
42589  test -z "$as_dir" && as_dir=.
42590    for ac_exec_ext in '' $ac_executable_extensions; do
42591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42592    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42594    break 2
42595  fi
42596done
42597  done
42598IFS=$as_save_IFS
42599
42600fi
42601fi
42602ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42603if test -n "$ac_ct_OBJCOPY"; then
42604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42605$as_echo "$ac_ct_OBJCOPY" >&6; }
42606else
42607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42608$as_echo "no" >&6; }
42609fi
42610
42611
42612  test -n "$ac_ct_OBJCOPY" && break
42613done
42614
42615  if test "x$ac_ct_OBJCOPY" = x; then
42616    OBJCOPY=""
42617  else
42618    case $cross_compiling:$ac_tool_warned in
42619yes:)
42620{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42621$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42622ac_tool_warned=yes ;;
42623esac
42624    OBJCOPY=$ac_ct_OBJCOPY
42625  fi
42626fi
42627
42628  else
42629    # The variable is set, but is it from the command line or the environment?
42630
42631    # Try to remove the string !OBJCOPY! from our list.
42632    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42633    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42634      # If it failed, the variable was not from the command line. Ignore it,
42635      # but warn the user (except for BASH, which is always set by the calling BASH).
42636      if test "xOBJCOPY" != xBASH; then
42637        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42638$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42639      fi
42640      # Try to locate tool using the code snippet
42641      if test -n "$ac_tool_prefix"; then
42642  for ac_prog in gobjcopy objcopy
42643  do
42644    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42645set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42647$as_echo_n "checking for $ac_word... " >&6; }
42648if ${ac_cv_prog_OBJCOPY+:} false; then :
42649  $as_echo_n "(cached) " >&6
42650else
42651  if test -n "$OBJCOPY"; then
42652  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42653else
42654as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42655for as_dir in $PATH
42656do
42657  IFS=$as_save_IFS
42658  test -z "$as_dir" && as_dir=.
42659    for ac_exec_ext in '' $ac_executable_extensions; do
42660  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42661    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42663    break 2
42664  fi
42665done
42666  done
42667IFS=$as_save_IFS
42668
42669fi
42670fi
42671OBJCOPY=$ac_cv_prog_OBJCOPY
42672if test -n "$OBJCOPY"; then
42673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42674$as_echo "$OBJCOPY" >&6; }
42675else
42676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42677$as_echo "no" >&6; }
42678fi
42679
42680
42681    test -n "$OBJCOPY" && break
42682  done
42683fi
42684if test -z "$OBJCOPY"; then
42685  ac_ct_OBJCOPY=$OBJCOPY
42686  for ac_prog in gobjcopy objcopy
42687do
42688  # Extract the first word of "$ac_prog", so it can be a program name with args.
42689set dummy $ac_prog; ac_word=$2
42690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42691$as_echo_n "checking for $ac_word... " >&6; }
42692if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42693  $as_echo_n "(cached) " >&6
42694else
42695  if test -n "$ac_ct_OBJCOPY"; then
42696  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42697else
42698as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42699for as_dir in $PATH
42700do
42701  IFS=$as_save_IFS
42702  test -z "$as_dir" && as_dir=.
42703    for ac_exec_ext in '' $ac_executable_extensions; do
42704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42705    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42707    break 2
42708  fi
42709done
42710  done
42711IFS=$as_save_IFS
42712
42713fi
42714fi
42715ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42716if test -n "$ac_ct_OBJCOPY"; then
42717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42718$as_echo "$ac_ct_OBJCOPY" >&6; }
42719else
42720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42721$as_echo "no" >&6; }
42722fi
42723
42724
42725  test -n "$ac_ct_OBJCOPY" && break
42726done
42727
42728  if test "x$ac_ct_OBJCOPY" = x; then
42729    OBJCOPY=""
42730  else
42731    case $cross_compiling:$ac_tool_warned in
42732yes:)
42733{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42734$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42735ac_tool_warned=yes ;;
42736esac
42737    OBJCOPY=$ac_ct_OBJCOPY
42738  fi
42739fi
42740
42741    else
42742      # If it succeeded, then it was overridden by the user. We will use it
42743      # for the tool.
42744
42745      # First remove it from the list of overridden variables, so we can test
42746      # for unknown variables in the end.
42747      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42748
42749      # Check if we try to supply an empty value
42750      if test "x$OBJCOPY" = x; then
42751        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42752$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42753        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42754$as_echo_n "checking for OBJCOPY... " >&6; }
42755        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42756$as_echo "disabled" >&6; }
42757      else
42758        # Check if the provided tool contains a complete path.
42759        tool_specified="$OBJCOPY"
42760        tool_basename="${tool_specified##*/}"
42761        if test "x$tool_basename" = "x$tool_specified"; then
42762          # A command without a complete path is provided, search $PATH.
42763          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42764$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42765          # Extract the first word of "$tool_basename", so it can be a program name with args.
42766set dummy $tool_basename; ac_word=$2
42767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42768$as_echo_n "checking for $ac_word... " >&6; }
42769if ${ac_cv_path_OBJCOPY+:} false; then :
42770  $as_echo_n "(cached) " >&6
42771else
42772  case $OBJCOPY in
42773  [\\/]* | ?:[\\/]*)
42774  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42775  ;;
42776  *)
42777  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42778for as_dir in $PATH
42779do
42780  IFS=$as_save_IFS
42781  test -z "$as_dir" && as_dir=.
42782    for ac_exec_ext in '' $ac_executable_extensions; do
42783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42784    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42786    break 2
42787  fi
42788done
42789  done
42790IFS=$as_save_IFS
42791
42792  ;;
42793esac
42794fi
42795OBJCOPY=$ac_cv_path_OBJCOPY
42796if test -n "$OBJCOPY"; then
42797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42798$as_echo "$OBJCOPY" >&6; }
42799else
42800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42801$as_echo "no" >&6; }
42802fi
42803
42804
42805          if test "x$OBJCOPY" = x; then
42806            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42807          fi
42808        else
42809          # Otherwise we believe it is a complete path. Use it as it is.
42810          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42811$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42812          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42813$as_echo_n "checking for OBJCOPY... " >&6; }
42814          if test ! -x "$tool_specified"; then
42815            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42816$as_echo "not found" >&6; }
42817            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42818          fi
42819          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42820$as_echo "$tool_specified" >&6; }
42821        fi
42822      fi
42823    fi
42824
42825  fi
42826
42827
42828    # Only call fixup if objcopy was found.
42829    if test -n "$OBJCOPY"; then
42830
42831  # Only process if variable expands to non-empty
42832
42833  if test "x$OBJCOPY" != x; then
42834    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42835
42836  # First separate the path from the arguments. This will split at the first
42837  # space.
42838  complete="$OBJCOPY"
42839  path="${complete%% *}"
42840  tmp="$complete EOL"
42841  arguments="${tmp#* }"
42842
42843  # Input might be given as Windows format, start by converting to
42844  # unix format.
42845  new_path=`$CYGPATH -u "$path"`
42846
42847  # Now try to locate executable using which
42848  new_path=`$WHICH "$new_path" 2> /dev/null`
42849  # bat and cmd files are not always considered executable in cygwin causing which
42850  # to not find them
42851  if test "x$new_path" = x \
42852      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42853      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42854    new_path=`$CYGPATH -u "$path"`
42855  fi
42856  if test "x$new_path" = x; then
42857    # Oops. Which didn't find the executable.
42858    # The splitting of arguments from the executable at a space might have been incorrect,
42859    # since paths with space are more likely in Windows. Give it another try with the whole
42860    # argument.
42861    path="$complete"
42862    arguments="EOL"
42863    new_path=`$CYGPATH -u "$path"`
42864    new_path=`$WHICH "$new_path" 2> /dev/null`
42865    # bat and cmd files are not always considered executable in cygwin causing which
42866    # to not find them
42867    if test "x$new_path" = x \
42868        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42869        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42870      new_path=`$CYGPATH -u "$path"`
42871    fi
42872    if test "x$new_path" = x; then
42873      # It's still not found. Now this is an unrecoverable error.
42874      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42875$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42876      has_space=`$ECHO "$complete" | $GREP " "`
42877      if test "x$has_space" != x; then
42878        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42879$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42880      fi
42881      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42882    fi
42883  fi
42884
42885  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42886  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42887  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42888  # "foo.exe" is OK but "foo" is an error.
42889  #
42890  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42891  # It is also a way to make sure we got the proper file name for the real test later on.
42892  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42893  if test "x$test_shortpath" = x; then
42894    # Short path failed, file does not exist as specified.
42895    # Try adding .exe or .cmd
42896    if test -f "${new_path}.exe"; then
42897      input_to_shortpath="${new_path}.exe"
42898    elif test -f "${new_path}.cmd"; then
42899      input_to_shortpath="${new_path}.cmd"
42900    else
42901      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42902$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42903      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42904$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42905      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42906    fi
42907  else
42908    input_to_shortpath="$new_path"
42909  fi
42910
42911  # Call helper function which possibly converts this using DOS-style short mode.
42912  # If so, the updated path is stored in $new_path.
42913  new_path="$input_to_shortpath"
42914
42915  input_path="$input_to_shortpath"
42916  # Check if we need to convert this using DOS-style short mode. If the path
42917  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42918  # take no chances and rewrite it.
42919  # Note: m4 eats our [], so we need to use [ and ] instead.
42920  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42921  if test "x$has_forbidden_chars" != x; then
42922    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42923    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42924    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42925    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42926      # Going to short mode and back again did indeed matter. Since short mode is
42927      # case insensitive, let's make it lowercase to improve readability.
42928      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42929      # Now convert it back to Unix-style (cygpath)
42930      input_path=`$CYGPATH -u "$shortmode_path"`
42931      new_path="$input_path"
42932    fi
42933  fi
42934
42935  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42936  if test "x$test_cygdrive_prefix" = x; then
42937    # As a simple fix, exclude /usr/bin since it's not a real path.
42938    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42939      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42940      # a path prefixed by /cygdrive for fixpath to work.
42941      new_path="$CYGWIN_ROOT_PATH$input_path"
42942    fi
42943  fi
42944
42945  # remove trailing .exe if any
42946  new_path="${new_path/%.exe/}"
42947
42948    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42949
42950  # First separate the path from the arguments. This will split at the first
42951  # space.
42952  complete="$OBJCOPY"
42953  path="${complete%% *}"
42954  tmp="$complete EOL"
42955  arguments="${tmp#* }"
42956
42957  # Input might be given as Windows format, start by converting to
42958  # unix format.
42959  new_path="$path"
42960
42961  windows_path="$new_path"
42962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42963    unix_path=`$CYGPATH -u "$windows_path"`
42964    new_path="$unix_path"
42965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42967    new_path="$unix_path"
42968  fi
42969
42970
42971  # Now try to locate executable using which
42972  new_path=`$WHICH "$new_path" 2> /dev/null`
42973
42974  if test "x$new_path" = x; then
42975    # Oops. Which didn't find the executable.
42976    # The splitting of arguments from the executable at a space might have been incorrect,
42977    # since paths with space are more likely in Windows. Give it another try with the whole
42978    # argument.
42979    path="$complete"
42980    arguments="EOL"
42981    new_path="$path"
42982
42983  windows_path="$new_path"
42984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42985    unix_path=`$CYGPATH -u "$windows_path"`
42986    new_path="$unix_path"
42987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42988    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42989    new_path="$unix_path"
42990  fi
42991
42992
42993    new_path=`$WHICH "$new_path" 2> /dev/null`
42994    # bat and cmd files are not always considered executable in MSYS causing which
42995    # to not find them
42996    if test "x$new_path" = x \
42997        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42998        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42999      new_path="$path"
43000
43001  windows_path="$new_path"
43002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43003    unix_path=`$CYGPATH -u "$windows_path"`
43004    new_path="$unix_path"
43005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43006    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43007    new_path="$unix_path"
43008  fi
43009
43010    fi
43011
43012    if test "x$new_path" = x; then
43013      # It's still not found. Now this is an unrecoverable error.
43014      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43015$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43016      has_space=`$ECHO "$complete" | $GREP " "`
43017      if test "x$has_space" != x; then
43018        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43019$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43020      fi
43021      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43022    fi
43023  fi
43024
43025  # Now new_path has a complete unix path to the binary
43026  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43027    # Keep paths in /bin as-is, but remove trailing .exe if any
43028    new_path="${new_path/%.exe/}"
43029    # Do not save /bin paths to all_fixpath_prefixes!
43030  else
43031    # Not in mixed or Windows style, start by that.
43032    new_path=`cmd //c echo $new_path`
43033
43034  input_path="$new_path"
43035  # Check if we need to convert this using DOS-style short mode. If the path
43036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43037  # take no chances and rewrite it.
43038  # Note: m4 eats our [], so we need to use [ and ] instead.
43039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43040  if test "x$has_forbidden_chars" != x; then
43041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43042    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43043  fi
43044
43045    # Output is in $new_path
43046
43047  windows_path="$new_path"
43048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43049    unix_path=`$CYGPATH -u "$windows_path"`
43050    new_path="$unix_path"
43051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43052    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43053    new_path="$unix_path"
43054  fi
43055
43056    # remove trailing .exe if any
43057    new_path="${new_path/%.exe/}"
43058
43059    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43060    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43061  fi
43062
43063    else
43064      # We're on a unix platform. Hooray! :)
43065      # First separate the path from the arguments. This will split at the first
43066      # space.
43067      complete="$OBJCOPY"
43068      path="${complete%% *}"
43069      tmp="$complete EOL"
43070      arguments="${tmp#* }"
43071
43072      # Cannot rely on the command "which" here since it doesn't always work.
43073      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43074      if test -z "$is_absolute_path"; then
43075        # Path to executable is not absolute. Find it.
43076        IFS_save="$IFS"
43077        IFS=:
43078        for p in $PATH; do
43079          if test -f "$p/$path" && test -x "$p/$path"; then
43080            new_path="$p/$path"
43081            break
43082          fi
43083        done
43084        IFS="$IFS_save"
43085      else
43086        # This is an absolute path, we can use it without further modifications.
43087        new_path="$path"
43088      fi
43089
43090      if test "x$new_path" = x; then
43091        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43092$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43093        has_space=`$ECHO "$complete" | $GREP " "`
43094        if test "x$has_space" != x; then
43095          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43096$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43097        fi
43098        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43099      fi
43100    fi
43101
43102    # Now join together the path and the arguments once again
43103    if test "x$arguments" != xEOL; then
43104      new_complete="$new_path ${arguments% *}"
43105    else
43106      new_complete="$new_path"
43107    fi
43108
43109    if test "x$complete" != "x$new_complete"; then
43110      OBJCOPY="$new_complete"
43111      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43112$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43113    fi
43114  fi
43115
43116      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43117        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43118        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43119        # - version number is last blank separate word on first line
43120        # - version number formats that have been seen:
43121        #   - <major>.<minor>
43122        #   - <major>.<minor>.<micro>
43123        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43124        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43125         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43126              -e 's/.* //' \
43127              -e '/^[01]\./b bad' \
43128              -e '/^2\./{' \
43129              -e '  s/^2\.//' \
43130              -e '  /^[0-9]$/b bad' \
43131              -e '  /^[0-9]\./b bad' \
43132              -e '  /^1[0-9]$/b bad' \
43133              -e '  /^1[0-9]\./b bad' \
43134              -e '  /^20\./b bad' \
43135              -e '  /^21\.0$/b bad' \
43136              -e '  /^21\.0\./b bad' \
43137              -e '}' \
43138              -e ':good' \
43139              -e 's/.*/VALID_VERSION/p' \
43140              -e 'q' \
43141              -e ':bad' \
43142              -e 's/.*/BAD_VERSION/p' \
43143              -e 'q'`
43144        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43145          OBJCOPY=
43146          { $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
43147$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43148          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43149$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43150          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43151$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43152          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43153$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43154          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43155$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43156        fi
43157      fi
43158    fi
43159  fi
43160
43161
43162
43163  # Publish this variable in the help.
43164
43165
43166  if [ -z "${OBJDUMP+x}" ]; then
43167    # The variable is not set by user, try to locate tool using the code snippet
43168    if test -n "$ac_tool_prefix"; then
43169  for ac_prog in gobjdump objdump
43170  do
43171    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43172set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43174$as_echo_n "checking for $ac_word... " >&6; }
43175if ${ac_cv_prog_OBJDUMP+:} false; then :
43176  $as_echo_n "(cached) " >&6
43177else
43178  if test -n "$OBJDUMP"; then
43179  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43180else
43181as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43182for as_dir in $PATH
43183do
43184  IFS=$as_save_IFS
43185  test -z "$as_dir" && as_dir=.
43186    for ac_exec_ext in '' $ac_executable_extensions; do
43187  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43188    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43190    break 2
43191  fi
43192done
43193  done
43194IFS=$as_save_IFS
43195
43196fi
43197fi
43198OBJDUMP=$ac_cv_prog_OBJDUMP
43199if test -n "$OBJDUMP"; then
43200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43201$as_echo "$OBJDUMP" >&6; }
43202else
43203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43204$as_echo "no" >&6; }
43205fi
43206
43207
43208    test -n "$OBJDUMP" && break
43209  done
43210fi
43211if test -z "$OBJDUMP"; then
43212  ac_ct_OBJDUMP=$OBJDUMP
43213  for ac_prog in gobjdump objdump
43214do
43215  # Extract the first word of "$ac_prog", so it can be a program name with args.
43216set dummy $ac_prog; ac_word=$2
43217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43218$as_echo_n "checking for $ac_word... " >&6; }
43219if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43220  $as_echo_n "(cached) " >&6
43221else
43222  if test -n "$ac_ct_OBJDUMP"; then
43223  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43224else
43225as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43226for as_dir in $PATH
43227do
43228  IFS=$as_save_IFS
43229  test -z "$as_dir" && as_dir=.
43230    for ac_exec_ext in '' $ac_executable_extensions; do
43231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43232    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43234    break 2
43235  fi
43236done
43237  done
43238IFS=$as_save_IFS
43239
43240fi
43241fi
43242ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43243if test -n "$ac_ct_OBJDUMP"; then
43244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43245$as_echo "$ac_ct_OBJDUMP" >&6; }
43246else
43247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43248$as_echo "no" >&6; }
43249fi
43250
43251
43252  test -n "$ac_ct_OBJDUMP" && break
43253done
43254
43255  if test "x$ac_ct_OBJDUMP" = x; then
43256    OBJDUMP=""
43257  else
43258    case $cross_compiling:$ac_tool_warned in
43259yes:)
43260{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43261$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43262ac_tool_warned=yes ;;
43263esac
43264    OBJDUMP=$ac_ct_OBJDUMP
43265  fi
43266fi
43267
43268  else
43269    # The variable is set, but is it from the command line or the environment?
43270
43271    # Try to remove the string !OBJDUMP! from our list.
43272    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43273    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43274      # If it failed, the variable was not from the command line. Ignore it,
43275      # but warn the user (except for BASH, which is always set by the calling BASH).
43276      if test "xOBJDUMP" != xBASH; then
43277        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43278$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43279      fi
43280      # Try to locate tool using the code snippet
43281      if test -n "$ac_tool_prefix"; then
43282  for ac_prog in gobjdump objdump
43283  do
43284    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43285set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43287$as_echo_n "checking for $ac_word... " >&6; }
43288if ${ac_cv_prog_OBJDUMP+:} false; then :
43289  $as_echo_n "(cached) " >&6
43290else
43291  if test -n "$OBJDUMP"; then
43292  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43293else
43294as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43295for as_dir in $PATH
43296do
43297  IFS=$as_save_IFS
43298  test -z "$as_dir" && as_dir=.
43299    for ac_exec_ext in '' $ac_executable_extensions; do
43300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43301    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43303    break 2
43304  fi
43305done
43306  done
43307IFS=$as_save_IFS
43308
43309fi
43310fi
43311OBJDUMP=$ac_cv_prog_OBJDUMP
43312if test -n "$OBJDUMP"; then
43313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43314$as_echo "$OBJDUMP" >&6; }
43315else
43316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43317$as_echo "no" >&6; }
43318fi
43319
43320
43321    test -n "$OBJDUMP" && break
43322  done
43323fi
43324if test -z "$OBJDUMP"; then
43325  ac_ct_OBJDUMP=$OBJDUMP
43326  for ac_prog in gobjdump objdump
43327do
43328  # Extract the first word of "$ac_prog", so it can be a program name with args.
43329set dummy $ac_prog; ac_word=$2
43330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43331$as_echo_n "checking for $ac_word... " >&6; }
43332if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43333  $as_echo_n "(cached) " >&6
43334else
43335  if test -n "$ac_ct_OBJDUMP"; then
43336  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43337else
43338as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43339for as_dir in $PATH
43340do
43341  IFS=$as_save_IFS
43342  test -z "$as_dir" && as_dir=.
43343    for ac_exec_ext in '' $ac_executable_extensions; do
43344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43345    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43347    break 2
43348  fi
43349done
43350  done
43351IFS=$as_save_IFS
43352
43353fi
43354fi
43355ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43356if test -n "$ac_ct_OBJDUMP"; then
43357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43358$as_echo "$ac_ct_OBJDUMP" >&6; }
43359else
43360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43361$as_echo "no" >&6; }
43362fi
43363
43364
43365  test -n "$ac_ct_OBJDUMP" && break
43366done
43367
43368  if test "x$ac_ct_OBJDUMP" = x; then
43369    OBJDUMP=""
43370  else
43371    case $cross_compiling:$ac_tool_warned in
43372yes:)
43373{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43374$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43375ac_tool_warned=yes ;;
43376esac
43377    OBJDUMP=$ac_ct_OBJDUMP
43378  fi
43379fi
43380
43381    else
43382      # If it succeeded, then it was overridden by the user. We will use it
43383      # for the tool.
43384
43385      # First remove it from the list of overridden variables, so we can test
43386      # for unknown variables in the end.
43387      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43388
43389      # Check if we try to supply an empty value
43390      if test "x$OBJDUMP" = x; then
43391        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
43392$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
43393        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43394$as_echo_n "checking for OBJDUMP... " >&6; }
43395        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43396$as_echo "disabled" >&6; }
43397      else
43398        # Check if the provided tool contains a complete path.
43399        tool_specified="$OBJDUMP"
43400        tool_basename="${tool_specified##*/}"
43401        if test "x$tool_basename" = "x$tool_specified"; then
43402          # A command without a complete path is provided, search $PATH.
43403          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
43404$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
43405          # Extract the first word of "$tool_basename", so it can be a program name with args.
43406set dummy $tool_basename; ac_word=$2
43407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43408$as_echo_n "checking for $ac_word... " >&6; }
43409if ${ac_cv_path_OBJDUMP+:} false; then :
43410  $as_echo_n "(cached) " >&6
43411else
43412  case $OBJDUMP in
43413  [\\/]* | ?:[\\/]*)
43414  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
43415  ;;
43416  *)
43417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43418for as_dir in $PATH
43419do
43420  IFS=$as_save_IFS
43421  test -z "$as_dir" && as_dir=.
43422    for ac_exec_ext in '' $ac_executable_extensions; do
43423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43424    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
43425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43426    break 2
43427  fi
43428done
43429  done
43430IFS=$as_save_IFS
43431
43432  ;;
43433esac
43434fi
43435OBJDUMP=$ac_cv_path_OBJDUMP
43436if test -n "$OBJDUMP"; then
43437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43438$as_echo "$OBJDUMP" >&6; }
43439else
43440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43441$as_echo "no" >&6; }
43442fi
43443
43444
43445          if test "x$OBJDUMP" = x; then
43446            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43447          fi
43448        else
43449          # Otherwise we believe it is a complete path. Use it as it is.
43450          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
43451$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
43452          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43453$as_echo_n "checking for OBJDUMP... " >&6; }
43454          if test ! -x "$tool_specified"; then
43455            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43456$as_echo "not found" >&6; }
43457            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
43458          fi
43459          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43460$as_echo "$tool_specified" >&6; }
43461        fi
43462      fi
43463    fi
43464
43465  fi
43466
43467
43468  if test "x$OBJDUMP" != x; then
43469    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
43470    # bails if argument is missing.
43471
43472  # Only process if variable expands to non-empty
43473
43474  if test "x$OBJDUMP" != x; then
43475    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43476
43477  # First separate the path from the arguments. This will split at the first
43478  # space.
43479  complete="$OBJDUMP"
43480  path="${complete%% *}"
43481  tmp="$complete EOL"
43482  arguments="${tmp#* }"
43483
43484  # Input might be given as Windows format, start by converting to
43485  # unix format.
43486  new_path=`$CYGPATH -u "$path"`
43487
43488  # Now try to locate executable using which
43489  new_path=`$WHICH "$new_path" 2> /dev/null`
43490  # bat and cmd files are not always considered executable in cygwin causing which
43491  # to not find them
43492  if test "x$new_path" = x \
43493      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43494      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43495    new_path=`$CYGPATH -u "$path"`
43496  fi
43497  if test "x$new_path" = x; then
43498    # Oops. Which didn't find the executable.
43499    # The splitting of arguments from the executable at a space might have been incorrect,
43500    # since paths with space are more likely in Windows. Give it another try with the whole
43501    # argument.
43502    path="$complete"
43503    arguments="EOL"
43504    new_path=`$CYGPATH -u "$path"`
43505    new_path=`$WHICH "$new_path" 2> /dev/null`
43506    # bat and cmd files are not always considered executable in cygwin causing which
43507    # to not find them
43508    if test "x$new_path" = x \
43509        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43510        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43511      new_path=`$CYGPATH -u "$path"`
43512    fi
43513    if test "x$new_path" = x; then
43514      # It's still not found. Now this is an unrecoverable error.
43515      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43516$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43517      has_space=`$ECHO "$complete" | $GREP " "`
43518      if test "x$has_space" != x; then
43519        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43520$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43521      fi
43522      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43523    fi
43524  fi
43525
43526  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43527  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43528  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43529  # "foo.exe" is OK but "foo" is an error.
43530  #
43531  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43532  # It is also a way to make sure we got the proper file name for the real test later on.
43533  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43534  if test "x$test_shortpath" = x; then
43535    # Short path failed, file does not exist as specified.
43536    # Try adding .exe or .cmd
43537    if test -f "${new_path}.exe"; then
43538      input_to_shortpath="${new_path}.exe"
43539    elif test -f "${new_path}.cmd"; then
43540      input_to_shortpath="${new_path}.cmd"
43541    else
43542      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43543$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43544      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43545$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43546      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43547    fi
43548  else
43549    input_to_shortpath="$new_path"
43550  fi
43551
43552  # Call helper function which possibly converts this using DOS-style short mode.
43553  # If so, the updated path is stored in $new_path.
43554  new_path="$input_to_shortpath"
43555
43556  input_path="$input_to_shortpath"
43557  # Check if we need to convert this using DOS-style short mode. If the path
43558  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43559  # take no chances and rewrite it.
43560  # Note: m4 eats our [], so we need to use [ and ] instead.
43561  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43562  if test "x$has_forbidden_chars" != x; then
43563    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43564    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43565    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43566    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43567      # Going to short mode and back again did indeed matter. Since short mode is
43568      # case insensitive, let's make it lowercase to improve readability.
43569      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43570      # Now convert it back to Unix-style (cygpath)
43571      input_path=`$CYGPATH -u "$shortmode_path"`
43572      new_path="$input_path"
43573    fi
43574  fi
43575
43576  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43577  if test "x$test_cygdrive_prefix" = x; then
43578    # As a simple fix, exclude /usr/bin since it's not a real path.
43579    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43580      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43581      # a path prefixed by /cygdrive for fixpath to work.
43582      new_path="$CYGWIN_ROOT_PATH$input_path"
43583    fi
43584  fi
43585
43586  # remove trailing .exe if any
43587  new_path="${new_path/%.exe/}"
43588
43589    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43590
43591  # First separate the path from the arguments. This will split at the first
43592  # space.
43593  complete="$OBJDUMP"
43594  path="${complete%% *}"
43595  tmp="$complete EOL"
43596  arguments="${tmp#* }"
43597
43598  # Input might be given as Windows format, start by converting to
43599  # unix format.
43600  new_path="$path"
43601
43602  windows_path="$new_path"
43603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43604    unix_path=`$CYGPATH -u "$windows_path"`
43605    new_path="$unix_path"
43606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43607    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43608    new_path="$unix_path"
43609  fi
43610
43611
43612  # Now try to locate executable using which
43613  new_path=`$WHICH "$new_path" 2> /dev/null`
43614
43615  if test "x$new_path" = x; then
43616    # Oops. Which didn't find the executable.
43617    # The splitting of arguments from the executable at a space might have been incorrect,
43618    # since paths with space are more likely in Windows. Give it another try with the whole
43619    # argument.
43620    path="$complete"
43621    arguments="EOL"
43622    new_path="$path"
43623
43624  windows_path="$new_path"
43625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43626    unix_path=`$CYGPATH -u "$windows_path"`
43627    new_path="$unix_path"
43628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43629    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43630    new_path="$unix_path"
43631  fi
43632
43633
43634    new_path=`$WHICH "$new_path" 2> /dev/null`
43635    # bat and cmd files are not always considered executable in MSYS causing which
43636    # to not find them
43637    if test "x$new_path" = x \
43638        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43639        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43640      new_path="$path"
43641
43642  windows_path="$new_path"
43643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43644    unix_path=`$CYGPATH -u "$windows_path"`
43645    new_path="$unix_path"
43646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43648    new_path="$unix_path"
43649  fi
43650
43651    fi
43652
43653    if test "x$new_path" = x; then
43654      # It's still not found. Now this is an unrecoverable error.
43655      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43656$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43657      has_space=`$ECHO "$complete" | $GREP " "`
43658      if test "x$has_space" != x; then
43659        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43660$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43661      fi
43662      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43663    fi
43664  fi
43665
43666  # Now new_path has a complete unix path to the binary
43667  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43668    # Keep paths in /bin as-is, but remove trailing .exe if any
43669    new_path="${new_path/%.exe/}"
43670    # Do not save /bin paths to all_fixpath_prefixes!
43671  else
43672    # Not in mixed or Windows style, start by that.
43673    new_path=`cmd //c echo $new_path`
43674
43675  input_path="$new_path"
43676  # Check if we need to convert this using DOS-style short mode. If the path
43677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43678  # take no chances and rewrite it.
43679  # Note: m4 eats our [], so we need to use [ and ] instead.
43680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43681  if test "x$has_forbidden_chars" != x; then
43682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43683    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43684  fi
43685
43686    # Output is in $new_path
43687
43688  windows_path="$new_path"
43689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43690    unix_path=`$CYGPATH -u "$windows_path"`
43691    new_path="$unix_path"
43692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43694    new_path="$unix_path"
43695  fi
43696
43697    # remove trailing .exe if any
43698    new_path="${new_path/%.exe/}"
43699
43700    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43701    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43702  fi
43703
43704    else
43705      # We're on a unix platform. Hooray! :)
43706      # First separate the path from the arguments. This will split at the first
43707      # space.
43708      complete="$OBJDUMP"
43709      path="${complete%% *}"
43710      tmp="$complete EOL"
43711      arguments="${tmp#* }"
43712
43713      # Cannot rely on the command "which" here since it doesn't always work.
43714      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43715      if test -z "$is_absolute_path"; then
43716        # Path to executable is not absolute. Find it.
43717        IFS_save="$IFS"
43718        IFS=:
43719        for p in $PATH; do
43720          if test -f "$p/$path" && test -x "$p/$path"; then
43721            new_path="$p/$path"
43722            break
43723          fi
43724        done
43725        IFS="$IFS_save"
43726      else
43727        # This is an absolute path, we can use it without further modifications.
43728        new_path="$path"
43729      fi
43730
43731      if test "x$new_path" = x; then
43732        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43733$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43734        has_space=`$ECHO "$complete" | $GREP " "`
43735        if test "x$has_space" != x; then
43736          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43737$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43738        fi
43739        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43740      fi
43741    fi
43742
43743    # Now join together the path and the arguments once again
43744    if test "x$arguments" != xEOL; then
43745      new_complete="$new_path ${arguments% *}"
43746    else
43747      new_complete="$new_path"
43748    fi
43749
43750    if test "x$complete" != "x$new_complete"; then
43751      OBJDUMP="$new_complete"
43752      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43753$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43754    fi
43755  fi
43756
43757  fi
43758
43759
43760  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
43761  # to remain in place. Otherwise the compiler will not work in some siutations
43762  # in later configure checks.
43763  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
43764    PATH="$OLD_PATH"
43765  fi
43766
43767  # Restore the flags to the user specified values.
43768  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43769  CFLAGS="$ORG_CFLAGS"
43770  CXXFLAGS="$ORG_CXXFLAGS"
43771
43772
43773# Finally do some processing after the detection phase
43774
43775  if test "x$COMPILE_TYPE" = "xcross"; then
43776    # Now we need to find a C/C++ compiler that can build executables for the
43777    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43778    # used once. Also, we need to do this without adding a tools dir to the
43779    # path, otherwise we might pick up cross-compilers which don't use standard
43780    # naming.
43781
43782    OLDPATH="$PATH"
43783
43784
43785# Check whether --with-build-devkit was given.
43786if test "${with_build_devkit+set}" = set; then :
43787  withval=$with_build_devkit;
43788fi
43789
43790    if test "x$with_build_devkit" = "xyes"; then
43791      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43792    elif test -n "$with_build_devkit"; then
43793      if test ! -d "$with_build_devkit"; then
43794        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43795      else
43796
43797  # Only process if variable expands to non-empty
43798
43799  if test "x$with_build_devkit" != x; then
43800    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43801
43802  # Input might be given as Windows format, start by converting to
43803  # unix format.
43804  path="$with_build_devkit"
43805  new_path=`$CYGPATH -u "$path"`
43806
43807  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43808  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43809  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43810  # "foo.exe" is OK but "foo" is an error.
43811  #
43812  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43813  # It is also a way to make sure we got the proper file name for the real test later on.
43814  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43815  if test "x$test_shortpath" = x; then
43816    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43817$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43818    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43819  fi
43820
43821  # Call helper function which possibly converts this using DOS-style short mode.
43822  # If so, the updated path is stored in $new_path.
43823
43824  input_path="$new_path"
43825  # Check if we need to convert this using DOS-style short mode. If the path
43826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43827  # take no chances and rewrite it.
43828  # Note: m4 eats our [], so we need to use [ and ] instead.
43829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43830  if test "x$has_forbidden_chars" != x; then
43831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43832    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43833    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43834    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43835      # Going to short mode and back again did indeed matter. Since short mode is
43836      # case insensitive, let's make it lowercase to improve readability.
43837      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43838      # Now convert it back to Unix-style (cygpath)
43839      input_path=`$CYGPATH -u "$shortmode_path"`
43840      new_path="$input_path"
43841    fi
43842  fi
43843
43844  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43845  if test "x$test_cygdrive_prefix" = x; then
43846    # As a simple fix, exclude /usr/bin since it's not a real path.
43847    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43848      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43849      # a path prefixed by /cygdrive for fixpath to work.
43850      new_path="$CYGWIN_ROOT_PATH$input_path"
43851    fi
43852  fi
43853
43854
43855  if test "x$path" != "x$new_path"; then
43856    with_build_devkit="$new_path"
43857    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43858$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43859  fi
43860
43861    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43862
43863  path="$with_build_devkit"
43864  has_colon=`$ECHO $path | $GREP ^.:`
43865  new_path="$path"
43866  if test "x$has_colon" = x; then
43867    # Not in mixed or Windows style, start by that.
43868    new_path=`cmd //c echo $path`
43869  fi
43870
43871
43872  input_path="$new_path"
43873  # Check if we need to convert this using DOS-style short mode. If the path
43874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43875  # take no chances and rewrite it.
43876  # Note: m4 eats our [], so we need to use [ and ] instead.
43877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43878  if test "x$has_forbidden_chars" != x; then
43879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43880    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43881  fi
43882
43883
43884  windows_path="$new_path"
43885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43886    unix_path=`$CYGPATH -u "$windows_path"`
43887    new_path="$unix_path"
43888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43889    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43890    new_path="$unix_path"
43891  fi
43892
43893  if test "x$path" != "x$new_path"; then
43894    with_build_devkit="$new_path"
43895    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43896$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43897  fi
43898
43899  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43900  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43901
43902    else
43903      # We're on a unix platform. Hooray! :)
43904      path="$with_build_devkit"
43905      has_space=`$ECHO "$path" | $GREP " "`
43906      if test "x$has_space" != x; then
43907        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43908$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43909        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43910      fi
43911
43912      # Use eval to expand a potential ~
43913      eval path="$path"
43914      if test ! -f "$path" && test ! -d "$path"; then
43915        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43916      fi
43917
43918      if test -d "$path"; then
43919        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43920      else
43921        dir="`$DIRNAME "$path"`"
43922        base="`$BASENAME "$path"`"
43923        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43924      fi
43925    fi
43926  fi
43927
43928        BUILD_DEVKIT_ROOT="$with_build_devkit"
43929        # Check for a meta data info file in the root of the devkit
43930        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43931          # Process devkit.info so that existing devkit variables are not
43932          # modified by this
43933          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43934              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43935              -e "s/\$host/\$build/g" \
43936              $BUILD_DEVKIT_ROOT/devkit.info \
43937              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43938          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43939          # This potentially sets the following:
43940          # A descriptive name of the devkit
43941
43942  if test "x$BUILD_DEVKIT_NAME" = x; then
43943    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43944  fi
43945
43946          # Corresponds to --with-extra-path
43947
43948  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43949    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43950  fi
43951
43952          # Corresponds to --with-toolchain-path
43953
43954  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43955    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43956  fi
43957
43958          # Corresponds to --with-sysroot
43959
43960  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43961    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43962  fi
43963
43964          # Skip the Window specific parts
43965        fi
43966
43967        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43968$as_echo_n "checking for build platform devkit... " >&6; }
43969        if test "x$BUILD_DEVKIT_NAME" != x; then
43970          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43971$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43972        else
43973          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43974$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43975        fi
43976
43977        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43978
43979  if test "x$BUILD_SYSROOT" != "x"; then
43980    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43981      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43982        # Solaris Studio does not have a concept of sysroot. Instead we must
43983        # make sure the default include and lib dirs are appended to each
43984        # compile and link command line. Must also add -I-xbuiltin to enable
43985        # inlining of system functions and intrinsics.
43986        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
43987        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43988            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
43989      fi
43990    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43991      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
43992      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
43993    elif test "x$TOOLCHAIN_TYPE" = xclang; then
43994      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
43995      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
43996    fi
43997    # Propagate the sysroot args to hotspot
43998    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
43999    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44000    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44001    # The global CFLAGS and LDFLAGS variables need these for configure to function
44002    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44003    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44004    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44005    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44006  fi
44007
44008  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44009    # We also need -iframework<path>/System/Library/Frameworks
44010    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44011    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44012    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44013    # set this here so it doesn't have to be peppered throughout the forest
44014    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44015    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44016  fi
44017
44018
44019
44020
44021
44022         # Fallback default of just /bin if DEVKIT_PATH is not defined
44023        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44024          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44025        fi
44026        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44027      fi
44028    fi
44029
44030    # FIXME: we should list the discovered compilers as an exclude pattern!
44031    # If we do that, we can do this detection before POST_DETECTION, and still
44032    # find the build compilers in the tools dir, if needed.
44033
44034
44035
44036  # Publish this variable in the help.
44037
44038
44039  if [ -z "${BUILD_CC+x}" ]; then
44040    # The variable is not set by user, try to locate tool using the code snippet
44041    for ac_prog in cl cc gcc
44042do
44043  # Extract the first word of "$ac_prog", so it can be a program name with args.
44044set dummy $ac_prog; ac_word=$2
44045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44046$as_echo_n "checking for $ac_word... " >&6; }
44047if ${ac_cv_path_BUILD_CC+:} false; then :
44048  $as_echo_n "(cached) " >&6
44049else
44050  case $BUILD_CC in
44051  [\\/]* | ?:[\\/]*)
44052  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44053  ;;
44054  *)
44055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44056for as_dir in $PATH
44057do
44058  IFS=$as_save_IFS
44059  test -z "$as_dir" && as_dir=.
44060    for ac_exec_ext in '' $ac_executable_extensions; do
44061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44062    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44064    break 2
44065  fi
44066done
44067  done
44068IFS=$as_save_IFS
44069
44070  ;;
44071esac
44072fi
44073BUILD_CC=$ac_cv_path_BUILD_CC
44074if test -n "$BUILD_CC"; then
44075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44076$as_echo "$BUILD_CC" >&6; }
44077else
44078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44079$as_echo "no" >&6; }
44080fi
44081
44082
44083  test -n "$BUILD_CC" && break
44084done
44085
44086  else
44087    # The variable is set, but is it from the command line or the environment?
44088
44089    # Try to remove the string !BUILD_CC! from our list.
44090    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44091    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44092      # If it failed, the variable was not from the command line. Ignore it,
44093      # but warn the user (except for BASH, which is always set by the calling BASH).
44094      if test "xBUILD_CC" != xBASH; then
44095        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44096$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44097      fi
44098      # Try to locate tool using the code snippet
44099      for ac_prog in cl cc gcc
44100do
44101  # Extract the first word of "$ac_prog", so it can be a program name with args.
44102set dummy $ac_prog; ac_word=$2
44103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44104$as_echo_n "checking for $ac_word... " >&6; }
44105if ${ac_cv_path_BUILD_CC+:} false; then :
44106  $as_echo_n "(cached) " >&6
44107else
44108  case $BUILD_CC in
44109  [\\/]* | ?:[\\/]*)
44110  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44111  ;;
44112  *)
44113  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44114for as_dir in $PATH
44115do
44116  IFS=$as_save_IFS
44117  test -z "$as_dir" && as_dir=.
44118    for ac_exec_ext in '' $ac_executable_extensions; do
44119  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44120    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44122    break 2
44123  fi
44124done
44125  done
44126IFS=$as_save_IFS
44127
44128  ;;
44129esac
44130fi
44131BUILD_CC=$ac_cv_path_BUILD_CC
44132if test -n "$BUILD_CC"; then
44133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44134$as_echo "$BUILD_CC" >&6; }
44135else
44136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44137$as_echo "no" >&6; }
44138fi
44139
44140
44141  test -n "$BUILD_CC" && break
44142done
44143
44144    else
44145      # If it succeeded, then it was overridden by the user. We will use it
44146      # for the tool.
44147
44148      # First remove it from the list of overridden variables, so we can test
44149      # for unknown variables in the end.
44150      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44151
44152      # Check if we try to supply an empty value
44153      if test "x$BUILD_CC" = x; then
44154        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44155$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44156        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44157$as_echo_n "checking for BUILD_CC... " >&6; }
44158        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44159$as_echo "disabled" >&6; }
44160      else
44161        # Check if the provided tool contains a complete path.
44162        tool_specified="$BUILD_CC"
44163        tool_basename="${tool_specified##*/}"
44164        if test "x$tool_basename" = "x$tool_specified"; then
44165          # A command without a complete path is provided, search $PATH.
44166          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44167$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44168          # Extract the first word of "$tool_basename", so it can be a program name with args.
44169set dummy $tool_basename; ac_word=$2
44170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44171$as_echo_n "checking for $ac_word... " >&6; }
44172if ${ac_cv_path_BUILD_CC+:} false; then :
44173  $as_echo_n "(cached) " >&6
44174else
44175  case $BUILD_CC in
44176  [\\/]* | ?:[\\/]*)
44177  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44178  ;;
44179  *)
44180  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44181for as_dir in $PATH
44182do
44183  IFS=$as_save_IFS
44184  test -z "$as_dir" && as_dir=.
44185    for ac_exec_ext in '' $ac_executable_extensions; do
44186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44187    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44189    break 2
44190  fi
44191done
44192  done
44193IFS=$as_save_IFS
44194
44195  ;;
44196esac
44197fi
44198BUILD_CC=$ac_cv_path_BUILD_CC
44199if test -n "$BUILD_CC"; then
44200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44201$as_echo "$BUILD_CC" >&6; }
44202else
44203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44204$as_echo "no" >&6; }
44205fi
44206
44207
44208          if test "x$BUILD_CC" = x; then
44209            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44210          fi
44211        else
44212          # Otherwise we believe it is a complete path. Use it as it is.
44213          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44214$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44215          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44216$as_echo_n "checking for BUILD_CC... " >&6; }
44217          if test ! -x "$tool_specified"; then
44218            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44219$as_echo "not found" >&6; }
44220            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44221          fi
44222          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44223$as_echo "$tool_specified" >&6; }
44224        fi
44225      fi
44226    fi
44227
44228  fi
44229
44230
44231
44232  if test "x$BUILD_CC" = x; then
44233    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44234  fi
44235
44236
44237
44238  # Only process if variable expands to non-empty
44239
44240  if test "x$BUILD_CC" != x; then
44241    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44242
44243  # First separate the path from the arguments. This will split at the first
44244  # space.
44245  complete="$BUILD_CC"
44246  path="${complete%% *}"
44247  tmp="$complete EOL"
44248  arguments="${tmp#* }"
44249
44250  # Input might be given as Windows format, start by converting to
44251  # unix format.
44252  new_path=`$CYGPATH -u "$path"`
44253
44254  # Now try to locate executable using which
44255  new_path=`$WHICH "$new_path" 2> /dev/null`
44256  # bat and cmd files are not always considered executable in cygwin causing which
44257  # to not find them
44258  if test "x$new_path" = x \
44259      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44260      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44261    new_path=`$CYGPATH -u "$path"`
44262  fi
44263  if test "x$new_path" = x; then
44264    # Oops. Which didn't find the executable.
44265    # The splitting of arguments from the executable at a space might have been incorrect,
44266    # since paths with space are more likely in Windows. Give it another try with the whole
44267    # argument.
44268    path="$complete"
44269    arguments="EOL"
44270    new_path=`$CYGPATH -u "$path"`
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      # It's still not found. Now this is an unrecoverable error.
44281      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44282$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44283      has_space=`$ECHO "$complete" | $GREP " "`
44284      if test "x$has_space" != x; then
44285        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44286$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44287      fi
44288      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44289    fi
44290  fi
44291
44292  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44293  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44294  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44295  # "foo.exe" is OK but "foo" is an error.
44296  #
44297  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44298  # It is also a way to make sure we got the proper file name for the real test later on.
44299  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44300  if test "x$test_shortpath" = x; then
44301    # Short path failed, file does not exist as specified.
44302    # Try adding .exe or .cmd
44303    if test -f "${new_path}.exe"; then
44304      input_to_shortpath="${new_path}.exe"
44305    elif test -f "${new_path}.cmd"; then
44306      input_to_shortpath="${new_path}.cmd"
44307    else
44308      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44309$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44310      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44311$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44312      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44313    fi
44314  else
44315    input_to_shortpath="$new_path"
44316  fi
44317
44318  # Call helper function which possibly converts this using DOS-style short mode.
44319  # If so, the updated path is stored in $new_path.
44320  new_path="$input_to_shortpath"
44321
44322  input_path="$input_to_shortpath"
44323  # Check if we need to convert this using DOS-style short mode. If the path
44324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44325  # take no chances and rewrite it.
44326  # Note: m4 eats our [], so we need to use [ and ] instead.
44327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44328  if test "x$has_forbidden_chars" != x; then
44329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44330    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44331    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44332    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44333      # Going to short mode and back again did indeed matter. Since short mode is
44334      # case insensitive, let's make it lowercase to improve readability.
44335      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44336      # Now convert it back to Unix-style (cygpath)
44337      input_path=`$CYGPATH -u "$shortmode_path"`
44338      new_path="$input_path"
44339    fi
44340  fi
44341
44342  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44343  if test "x$test_cygdrive_prefix" = x; then
44344    # As a simple fix, exclude /usr/bin since it's not a real path.
44345    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44346      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44347      # a path prefixed by /cygdrive for fixpath to work.
44348      new_path="$CYGWIN_ROOT_PATH$input_path"
44349    fi
44350  fi
44351
44352  # remove trailing .exe if any
44353  new_path="${new_path/%.exe/}"
44354
44355    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44356
44357  # First separate the path from the arguments. This will split at the first
44358  # space.
44359  complete="$BUILD_CC"
44360  path="${complete%% *}"
44361  tmp="$complete EOL"
44362  arguments="${tmp#* }"
44363
44364  # Input might be given as Windows format, start by converting to
44365  # unix format.
44366  new_path="$path"
44367
44368  windows_path="$new_path"
44369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44370    unix_path=`$CYGPATH -u "$windows_path"`
44371    new_path="$unix_path"
44372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44374    new_path="$unix_path"
44375  fi
44376
44377
44378  # Now try to locate executable using which
44379  new_path=`$WHICH "$new_path" 2> /dev/null`
44380
44381  if test "x$new_path" = x; then
44382    # Oops. Which didn't find the executable.
44383    # The splitting of arguments from the executable at a space might have been incorrect,
44384    # since paths with space are more likely in Windows. Give it another try with the whole
44385    # argument.
44386    path="$complete"
44387    arguments="EOL"
44388    new_path="$path"
44389
44390  windows_path="$new_path"
44391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44392    unix_path=`$CYGPATH -u "$windows_path"`
44393    new_path="$unix_path"
44394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44396    new_path="$unix_path"
44397  fi
44398
44399
44400    new_path=`$WHICH "$new_path" 2> /dev/null`
44401    # bat and cmd files are not always considered executable in MSYS causing which
44402    # to not find them
44403    if test "x$new_path" = x \
44404        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44405        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44406      new_path="$path"
44407
44408  windows_path="$new_path"
44409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44410    unix_path=`$CYGPATH -u "$windows_path"`
44411    new_path="$unix_path"
44412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44414    new_path="$unix_path"
44415  fi
44416
44417    fi
44418
44419    if test "x$new_path" = x; then
44420      # It's still not found. Now this is an unrecoverable error.
44421      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44422$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44423      has_space=`$ECHO "$complete" | $GREP " "`
44424      if test "x$has_space" != x; then
44425        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44426$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44427      fi
44428      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44429    fi
44430  fi
44431
44432  # Now new_path has a complete unix path to the binary
44433  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44434    # Keep paths in /bin as-is, but remove trailing .exe if any
44435    new_path="${new_path/%.exe/}"
44436    # Do not save /bin paths to all_fixpath_prefixes!
44437  else
44438    # Not in mixed or Windows style, start by that.
44439    new_path=`cmd //c echo $new_path`
44440
44441  input_path="$new_path"
44442  # Check if we need to convert this using DOS-style short mode. If the path
44443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44444  # take no chances and rewrite it.
44445  # Note: m4 eats our [], so we need to use [ and ] instead.
44446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44447  if test "x$has_forbidden_chars" != x; then
44448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44449    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44450  fi
44451
44452    # Output is in $new_path
44453
44454  windows_path="$new_path"
44455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44456    unix_path=`$CYGPATH -u "$windows_path"`
44457    new_path="$unix_path"
44458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44460    new_path="$unix_path"
44461  fi
44462
44463    # remove trailing .exe if any
44464    new_path="${new_path/%.exe/}"
44465
44466    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44467    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44468  fi
44469
44470    else
44471      # We're on a unix platform. Hooray! :)
44472      # First separate the path from the arguments. This will split at the first
44473      # space.
44474      complete="$BUILD_CC"
44475      path="${complete%% *}"
44476      tmp="$complete EOL"
44477      arguments="${tmp#* }"
44478
44479      # Cannot rely on the command "which" here since it doesn't always work.
44480      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44481      if test -z "$is_absolute_path"; then
44482        # Path to executable is not absolute. Find it.
44483        IFS_save="$IFS"
44484        IFS=:
44485        for p in $PATH; do
44486          if test -f "$p/$path" && test -x "$p/$path"; then
44487            new_path="$p/$path"
44488            break
44489          fi
44490        done
44491        IFS="$IFS_save"
44492      else
44493        # This is an absolute path, we can use it without further modifications.
44494        new_path="$path"
44495      fi
44496
44497      if test "x$new_path" = x; then
44498        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44499$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44500        has_space=`$ECHO "$complete" | $GREP " "`
44501        if test "x$has_space" != x; then
44502          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44503$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44504        fi
44505        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44506      fi
44507    fi
44508
44509    # Now join together the path and the arguments once again
44510    if test "x$arguments" != xEOL; then
44511      new_complete="$new_path ${arguments% *}"
44512    else
44513      new_complete="$new_path"
44514    fi
44515
44516    if test "x$complete" != "x$new_complete"; then
44517      BUILD_CC="$new_complete"
44518      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44519$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44520    fi
44521  fi
44522
44523
44524
44525
44526  # Publish this variable in the help.
44527
44528
44529  if [ -z "${BUILD_CXX+x}" ]; then
44530    # The variable is not set by user, try to locate tool using the code snippet
44531    for ac_prog in cl CC g++
44532do
44533  # Extract the first word of "$ac_prog", so it can be a program name with args.
44534set dummy $ac_prog; ac_word=$2
44535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44536$as_echo_n "checking for $ac_word... " >&6; }
44537if ${ac_cv_path_BUILD_CXX+:} false; then :
44538  $as_echo_n "(cached) " >&6
44539else
44540  case $BUILD_CXX in
44541  [\\/]* | ?:[\\/]*)
44542  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44543  ;;
44544  *)
44545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44546for as_dir in $PATH
44547do
44548  IFS=$as_save_IFS
44549  test -z "$as_dir" && as_dir=.
44550    for ac_exec_ext in '' $ac_executable_extensions; do
44551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44552    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44554    break 2
44555  fi
44556done
44557  done
44558IFS=$as_save_IFS
44559
44560  ;;
44561esac
44562fi
44563BUILD_CXX=$ac_cv_path_BUILD_CXX
44564if test -n "$BUILD_CXX"; then
44565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44566$as_echo "$BUILD_CXX" >&6; }
44567else
44568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44569$as_echo "no" >&6; }
44570fi
44571
44572
44573  test -n "$BUILD_CXX" && break
44574done
44575
44576  else
44577    # The variable is set, but is it from the command line or the environment?
44578
44579    # Try to remove the string !BUILD_CXX! from our list.
44580    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44581    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44582      # If it failed, the variable was not from the command line. Ignore it,
44583      # but warn the user (except for BASH, which is always set by the calling BASH).
44584      if test "xBUILD_CXX" != xBASH; then
44585        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44586$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44587      fi
44588      # Try to locate tool using the code snippet
44589      for ac_prog in cl CC g++
44590do
44591  # Extract the first word of "$ac_prog", so it can be a program name with args.
44592set dummy $ac_prog; ac_word=$2
44593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44594$as_echo_n "checking for $ac_word... " >&6; }
44595if ${ac_cv_path_BUILD_CXX+:} false; then :
44596  $as_echo_n "(cached) " >&6
44597else
44598  case $BUILD_CXX in
44599  [\\/]* | ?:[\\/]*)
44600  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44601  ;;
44602  *)
44603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44604for as_dir in $PATH
44605do
44606  IFS=$as_save_IFS
44607  test -z "$as_dir" && as_dir=.
44608    for ac_exec_ext in '' $ac_executable_extensions; do
44609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44610    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44612    break 2
44613  fi
44614done
44615  done
44616IFS=$as_save_IFS
44617
44618  ;;
44619esac
44620fi
44621BUILD_CXX=$ac_cv_path_BUILD_CXX
44622if test -n "$BUILD_CXX"; then
44623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44624$as_echo "$BUILD_CXX" >&6; }
44625else
44626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44627$as_echo "no" >&6; }
44628fi
44629
44630
44631  test -n "$BUILD_CXX" && break
44632done
44633
44634    else
44635      # If it succeeded, then it was overridden by the user. We will use it
44636      # for the tool.
44637
44638      # First remove it from the list of overridden variables, so we can test
44639      # for unknown variables in the end.
44640      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44641
44642      # Check if we try to supply an empty value
44643      if test "x$BUILD_CXX" = x; then
44644        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44645$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44646        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44647$as_echo_n "checking for BUILD_CXX... " >&6; }
44648        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44649$as_echo "disabled" >&6; }
44650      else
44651        # Check if the provided tool contains a complete path.
44652        tool_specified="$BUILD_CXX"
44653        tool_basename="${tool_specified##*/}"
44654        if test "x$tool_basename" = "x$tool_specified"; then
44655          # A command without a complete path is provided, search $PATH.
44656          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44657$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44658          # Extract the first word of "$tool_basename", so it can be a program name with args.
44659set dummy $tool_basename; ac_word=$2
44660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44661$as_echo_n "checking for $ac_word... " >&6; }
44662if ${ac_cv_path_BUILD_CXX+:} false; then :
44663  $as_echo_n "(cached) " >&6
44664else
44665  case $BUILD_CXX in
44666  [\\/]* | ?:[\\/]*)
44667  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44668  ;;
44669  *)
44670  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44671for as_dir in $PATH
44672do
44673  IFS=$as_save_IFS
44674  test -z "$as_dir" && as_dir=.
44675    for ac_exec_ext in '' $ac_executable_extensions; do
44676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44677    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44679    break 2
44680  fi
44681done
44682  done
44683IFS=$as_save_IFS
44684
44685  ;;
44686esac
44687fi
44688BUILD_CXX=$ac_cv_path_BUILD_CXX
44689if test -n "$BUILD_CXX"; then
44690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44691$as_echo "$BUILD_CXX" >&6; }
44692else
44693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44694$as_echo "no" >&6; }
44695fi
44696
44697
44698          if test "x$BUILD_CXX" = x; then
44699            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44700          fi
44701        else
44702          # Otherwise we believe it is a complete path. Use it as it is.
44703          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44704$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44705          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44706$as_echo_n "checking for BUILD_CXX... " >&6; }
44707          if test ! -x "$tool_specified"; then
44708            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44709$as_echo "not found" >&6; }
44710            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44711          fi
44712          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44713$as_echo "$tool_specified" >&6; }
44714        fi
44715      fi
44716    fi
44717
44718  fi
44719
44720
44721
44722  if test "x$BUILD_CXX" = x; then
44723    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44724  fi
44725
44726
44727
44728  # Only process if variable expands to non-empty
44729
44730  if test "x$BUILD_CXX" != x; then
44731    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44732
44733  # First separate the path from the arguments. This will split at the first
44734  # space.
44735  complete="$BUILD_CXX"
44736  path="${complete%% *}"
44737  tmp="$complete EOL"
44738  arguments="${tmp#* }"
44739
44740  # Input might be given as Windows format, start by converting to
44741  # unix format.
44742  new_path=`$CYGPATH -u "$path"`
44743
44744  # Now try to locate executable using which
44745  new_path=`$WHICH "$new_path" 2> /dev/null`
44746  # bat and cmd files are not always considered executable in cygwin causing which
44747  # to not find them
44748  if test "x$new_path" = x \
44749      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44750      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44751    new_path=`$CYGPATH -u "$path"`
44752  fi
44753  if test "x$new_path" = x; then
44754    # Oops. Which didn't find the executable.
44755    # The splitting of arguments from the executable at a space might have been incorrect,
44756    # since paths with space are more likely in Windows. Give it another try with the whole
44757    # argument.
44758    path="$complete"
44759    arguments="EOL"
44760    new_path=`$CYGPATH -u "$path"`
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      # It's still not found. Now this is an unrecoverable error.
44771      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44772$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44773      has_space=`$ECHO "$complete" | $GREP " "`
44774      if test "x$has_space" != x; then
44775        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44776$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44777      fi
44778      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44779    fi
44780  fi
44781
44782  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44783  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44784  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44785  # "foo.exe" is OK but "foo" is an error.
44786  #
44787  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44788  # It is also a way to make sure we got the proper file name for the real test later on.
44789  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44790  if test "x$test_shortpath" = x; then
44791    # Short path failed, file does not exist as specified.
44792    # Try adding .exe or .cmd
44793    if test -f "${new_path}.exe"; then
44794      input_to_shortpath="${new_path}.exe"
44795    elif test -f "${new_path}.cmd"; then
44796      input_to_shortpath="${new_path}.cmd"
44797    else
44798      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44799$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44800      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44801$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44802      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44803    fi
44804  else
44805    input_to_shortpath="$new_path"
44806  fi
44807
44808  # Call helper function which possibly converts this using DOS-style short mode.
44809  # If so, the updated path is stored in $new_path.
44810  new_path="$input_to_shortpath"
44811
44812  input_path="$input_to_shortpath"
44813  # Check if we need to convert this using DOS-style short mode. If the path
44814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44815  # take no chances and rewrite it.
44816  # Note: m4 eats our [], so we need to use [ and ] instead.
44817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44818  if test "x$has_forbidden_chars" != x; then
44819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44820    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44821    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44822    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44823      # Going to short mode and back again did indeed matter. Since short mode is
44824      # case insensitive, let's make it lowercase to improve readability.
44825      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44826      # Now convert it back to Unix-style (cygpath)
44827      input_path=`$CYGPATH -u "$shortmode_path"`
44828      new_path="$input_path"
44829    fi
44830  fi
44831
44832  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44833  if test "x$test_cygdrive_prefix" = x; then
44834    # As a simple fix, exclude /usr/bin since it's not a real path.
44835    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44836      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44837      # a path prefixed by /cygdrive for fixpath to work.
44838      new_path="$CYGWIN_ROOT_PATH$input_path"
44839    fi
44840  fi
44841
44842  # remove trailing .exe if any
44843  new_path="${new_path/%.exe/}"
44844
44845    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44846
44847  # First separate the path from the arguments. This will split at the first
44848  # space.
44849  complete="$BUILD_CXX"
44850  path="${complete%% *}"
44851  tmp="$complete EOL"
44852  arguments="${tmp#* }"
44853
44854  # Input might be given as Windows format, start by converting to
44855  # unix format.
44856  new_path="$path"
44857
44858  windows_path="$new_path"
44859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44860    unix_path=`$CYGPATH -u "$windows_path"`
44861    new_path="$unix_path"
44862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44863    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44864    new_path="$unix_path"
44865  fi
44866
44867
44868  # Now try to locate executable using which
44869  new_path=`$WHICH "$new_path" 2> /dev/null`
44870
44871  if test "x$new_path" = x; then
44872    # Oops. Which didn't find the executable.
44873    # The splitting of arguments from the executable at a space might have been incorrect,
44874    # since paths with space are more likely in Windows. Give it another try with the whole
44875    # argument.
44876    path="$complete"
44877    arguments="EOL"
44878    new_path="$path"
44879
44880  windows_path="$new_path"
44881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44882    unix_path=`$CYGPATH -u "$windows_path"`
44883    new_path="$unix_path"
44884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44886    new_path="$unix_path"
44887  fi
44888
44889
44890    new_path=`$WHICH "$new_path" 2> /dev/null`
44891    # bat and cmd files are not always considered executable in MSYS causing which
44892    # to not find them
44893    if test "x$new_path" = x \
44894        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44895        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44896      new_path="$path"
44897
44898  windows_path="$new_path"
44899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44900    unix_path=`$CYGPATH -u "$windows_path"`
44901    new_path="$unix_path"
44902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44904    new_path="$unix_path"
44905  fi
44906
44907    fi
44908
44909    if test "x$new_path" = x; then
44910      # It's still not found. Now this is an unrecoverable error.
44911      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44912$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44913      has_space=`$ECHO "$complete" | $GREP " "`
44914      if test "x$has_space" != x; then
44915        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44916$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44917      fi
44918      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44919    fi
44920  fi
44921
44922  # Now new_path has a complete unix path to the binary
44923  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44924    # Keep paths in /bin as-is, but remove trailing .exe if any
44925    new_path="${new_path/%.exe/}"
44926    # Do not save /bin paths to all_fixpath_prefixes!
44927  else
44928    # Not in mixed or Windows style, start by that.
44929    new_path=`cmd //c echo $new_path`
44930
44931  input_path="$new_path"
44932  # Check if we need to convert this using DOS-style short mode. If the path
44933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44934  # take no chances and rewrite it.
44935  # Note: m4 eats our [], so we need to use [ and ] instead.
44936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44937  if test "x$has_forbidden_chars" != x; then
44938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44939    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44940  fi
44941
44942    # Output is in $new_path
44943
44944  windows_path="$new_path"
44945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44946    unix_path=`$CYGPATH -u "$windows_path"`
44947    new_path="$unix_path"
44948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44950    new_path="$unix_path"
44951  fi
44952
44953    # remove trailing .exe if any
44954    new_path="${new_path/%.exe/}"
44955
44956    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44957    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44958  fi
44959
44960    else
44961      # We're on a unix platform. Hooray! :)
44962      # First separate the path from the arguments. This will split at the first
44963      # space.
44964      complete="$BUILD_CXX"
44965      path="${complete%% *}"
44966      tmp="$complete EOL"
44967      arguments="${tmp#* }"
44968
44969      # Cannot rely on the command "which" here since it doesn't always work.
44970      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44971      if test -z "$is_absolute_path"; then
44972        # Path to executable is not absolute. Find it.
44973        IFS_save="$IFS"
44974        IFS=:
44975        for p in $PATH; do
44976          if test -f "$p/$path" && test -x "$p/$path"; then
44977            new_path="$p/$path"
44978            break
44979          fi
44980        done
44981        IFS="$IFS_save"
44982      else
44983        # This is an absolute path, we can use it without further modifications.
44984        new_path="$path"
44985      fi
44986
44987      if test "x$new_path" = x; then
44988        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44989$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44990        has_space=`$ECHO "$complete" | $GREP " "`
44991        if test "x$has_space" != x; then
44992          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44993$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44994        fi
44995        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44996      fi
44997    fi
44998
44999    # Now join together the path and the arguments once again
45000    if test "x$arguments" != xEOL; then
45001      new_complete="$new_path ${arguments% *}"
45002    else
45003      new_complete="$new_path"
45004    fi
45005
45006    if test "x$complete" != "x$new_complete"; then
45007      BUILD_CXX="$new_complete"
45008      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45009$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45010    fi
45011  fi
45012
45013
45014
45015  # Publish this variable in the help.
45016
45017
45018  if [ -z "${BUILD_NM+x}" ]; then
45019    # The variable is not set by user, try to locate tool using the code snippet
45020    for ac_prog in nm gcc-nm
45021do
45022  # Extract the first word of "$ac_prog", so it can be a program name with args.
45023set dummy $ac_prog; ac_word=$2
45024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45025$as_echo_n "checking for $ac_word... " >&6; }
45026if ${ac_cv_path_BUILD_NM+:} false; then :
45027  $as_echo_n "(cached) " >&6
45028else
45029  case $BUILD_NM in
45030  [\\/]* | ?:[\\/]*)
45031  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45032  ;;
45033  *)
45034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45035for as_dir in $PATH
45036do
45037  IFS=$as_save_IFS
45038  test -z "$as_dir" && as_dir=.
45039    for ac_exec_ext in '' $ac_executable_extensions; do
45040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45041    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45043    break 2
45044  fi
45045done
45046  done
45047IFS=$as_save_IFS
45048
45049  ;;
45050esac
45051fi
45052BUILD_NM=$ac_cv_path_BUILD_NM
45053if test -n "$BUILD_NM"; then
45054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45055$as_echo "$BUILD_NM" >&6; }
45056else
45057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45058$as_echo "no" >&6; }
45059fi
45060
45061
45062  test -n "$BUILD_NM" && break
45063done
45064
45065  else
45066    # The variable is set, but is it from the command line or the environment?
45067
45068    # Try to remove the string !BUILD_NM! from our list.
45069    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45070    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45071      # If it failed, the variable was not from the command line. Ignore it,
45072      # but warn the user (except for BASH, which is always set by the calling BASH).
45073      if test "xBUILD_NM" != xBASH; then
45074        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45075$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45076      fi
45077      # Try to locate tool using the code snippet
45078      for ac_prog in nm gcc-nm
45079do
45080  # Extract the first word of "$ac_prog", so it can be a program name with args.
45081set dummy $ac_prog; ac_word=$2
45082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45083$as_echo_n "checking for $ac_word... " >&6; }
45084if ${ac_cv_path_BUILD_NM+:} false; then :
45085  $as_echo_n "(cached) " >&6
45086else
45087  case $BUILD_NM in
45088  [\\/]* | ?:[\\/]*)
45089  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45090  ;;
45091  *)
45092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45093for as_dir in $PATH
45094do
45095  IFS=$as_save_IFS
45096  test -z "$as_dir" && as_dir=.
45097    for ac_exec_ext in '' $ac_executable_extensions; do
45098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45099    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45101    break 2
45102  fi
45103done
45104  done
45105IFS=$as_save_IFS
45106
45107  ;;
45108esac
45109fi
45110BUILD_NM=$ac_cv_path_BUILD_NM
45111if test -n "$BUILD_NM"; then
45112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45113$as_echo "$BUILD_NM" >&6; }
45114else
45115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45116$as_echo "no" >&6; }
45117fi
45118
45119
45120  test -n "$BUILD_NM" && break
45121done
45122
45123    else
45124      # If it succeeded, then it was overridden by the user. We will use it
45125      # for the tool.
45126
45127      # First remove it from the list of overridden variables, so we can test
45128      # for unknown variables in the end.
45129      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45130
45131      # Check if we try to supply an empty value
45132      if test "x$BUILD_NM" = x; then
45133        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45134$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45135        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45136$as_echo_n "checking for BUILD_NM... " >&6; }
45137        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45138$as_echo "disabled" >&6; }
45139      else
45140        # Check if the provided tool contains a complete path.
45141        tool_specified="$BUILD_NM"
45142        tool_basename="${tool_specified##*/}"
45143        if test "x$tool_basename" = "x$tool_specified"; then
45144          # A command without a complete path is provided, search $PATH.
45145          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45146$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45147          # Extract the first word of "$tool_basename", so it can be a program name with args.
45148set dummy $tool_basename; ac_word=$2
45149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45150$as_echo_n "checking for $ac_word... " >&6; }
45151if ${ac_cv_path_BUILD_NM+:} false; then :
45152  $as_echo_n "(cached) " >&6
45153else
45154  case $BUILD_NM in
45155  [\\/]* | ?:[\\/]*)
45156  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45157  ;;
45158  *)
45159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45160for as_dir in $PATH
45161do
45162  IFS=$as_save_IFS
45163  test -z "$as_dir" && as_dir=.
45164    for ac_exec_ext in '' $ac_executable_extensions; do
45165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45166    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45168    break 2
45169  fi
45170done
45171  done
45172IFS=$as_save_IFS
45173
45174  ;;
45175esac
45176fi
45177BUILD_NM=$ac_cv_path_BUILD_NM
45178if test -n "$BUILD_NM"; then
45179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45180$as_echo "$BUILD_NM" >&6; }
45181else
45182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45183$as_echo "no" >&6; }
45184fi
45185
45186
45187          if test "x$BUILD_NM" = x; then
45188            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45189          fi
45190        else
45191          # Otherwise we believe it is a complete path. Use it as it is.
45192          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45193$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45194          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45195$as_echo_n "checking for BUILD_NM... " >&6; }
45196          if test ! -x "$tool_specified"; then
45197            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45198$as_echo "not found" >&6; }
45199            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45200          fi
45201          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45202$as_echo "$tool_specified" >&6; }
45203        fi
45204      fi
45205    fi
45206
45207  fi
45208
45209
45210
45211  # Only process if variable expands to non-empty
45212
45213  if test "x$BUILD_NM" != x; then
45214    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45215
45216  # First separate the path from the arguments. This will split at the first
45217  # space.
45218  complete="$BUILD_NM"
45219  path="${complete%% *}"
45220  tmp="$complete EOL"
45221  arguments="${tmp#* }"
45222
45223  # Input might be given as Windows format, start by converting to
45224  # unix format.
45225  new_path=`$CYGPATH -u "$path"`
45226
45227  # Now try to locate executable using which
45228  new_path=`$WHICH "$new_path" 2> /dev/null`
45229  # bat and cmd files are not always considered executable in cygwin causing which
45230  # to not find them
45231  if test "x$new_path" = x \
45232      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45233      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45234    new_path=`$CYGPATH -u "$path"`
45235  fi
45236  if test "x$new_path" = x; then
45237    # Oops. Which didn't find the executable.
45238    # The splitting of arguments from the executable at a space might have been incorrect,
45239    # since paths with space are more likely in Windows. Give it another try with the whole
45240    # argument.
45241    path="$complete"
45242    arguments="EOL"
45243    new_path=`$CYGPATH -u "$path"`
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      # It's still not found. Now this is an unrecoverable error.
45254      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45255$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45256      has_space=`$ECHO "$complete" | $GREP " "`
45257      if test "x$has_space" != x; then
45258        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45259$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45260      fi
45261      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45262    fi
45263  fi
45264
45265  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45266  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45267  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45268  # "foo.exe" is OK but "foo" is an error.
45269  #
45270  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45271  # It is also a way to make sure we got the proper file name for the real test later on.
45272  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45273  if test "x$test_shortpath" = x; then
45274    # Short path failed, file does not exist as specified.
45275    # Try adding .exe or .cmd
45276    if test -f "${new_path}.exe"; then
45277      input_to_shortpath="${new_path}.exe"
45278    elif test -f "${new_path}.cmd"; then
45279      input_to_shortpath="${new_path}.cmd"
45280    else
45281      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45282$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45283      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45284$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45285      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45286    fi
45287  else
45288    input_to_shortpath="$new_path"
45289  fi
45290
45291  # Call helper function which possibly converts this using DOS-style short mode.
45292  # If so, the updated path is stored in $new_path.
45293  new_path="$input_to_shortpath"
45294
45295  input_path="$input_to_shortpath"
45296  # Check if we need to convert this using DOS-style short mode. If the path
45297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45298  # take no chances and rewrite it.
45299  # Note: m4 eats our [], so we need to use [ and ] instead.
45300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45301  if test "x$has_forbidden_chars" != x; then
45302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45303    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45304    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45305    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45306      # Going to short mode and back again did indeed matter. Since short mode is
45307      # case insensitive, let's make it lowercase to improve readability.
45308      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45309      # Now convert it back to Unix-style (cygpath)
45310      input_path=`$CYGPATH -u "$shortmode_path"`
45311      new_path="$input_path"
45312    fi
45313  fi
45314
45315  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45316  if test "x$test_cygdrive_prefix" = x; then
45317    # As a simple fix, exclude /usr/bin since it's not a real path.
45318    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45319      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45320      # a path prefixed by /cygdrive for fixpath to work.
45321      new_path="$CYGWIN_ROOT_PATH$input_path"
45322    fi
45323  fi
45324
45325  # remove trailing .exe if any
45326  new_path="${new_path/%.exe/}"
45327
45328    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45329
45330  # First separate the path from the arguments. This will split at the first
45331  # space.
45332  complete="$BUILD_NM"
45333  path="${complete%% *}"
45334  tmp="$complete EOL"
45335  arguments="${tmp#* }"
45336
45337  # Input might be given as Windows format, start by converting to
45338  # unix format.
45339  new_path="$path"
45340
45341  windows_path="$new_path"
45342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45343    unix_path=`$CYGPATH -u "$windows_path"`
45344    new_path="$unix_path"
45345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45347    new_path="$unix_path"
45348  fi
45349
45350
45351  # Now try to locate executable using which
45352  new_path=`$WHICH "$new_path" 2> /dev/null`
45353
45354  if test "x$new_path" = x; then
45355    # Oops. Which didn't find the executable.
45356    # The splitting of arguments from the executable at a space might have been incorrect,
45357    # since paths with space are more likely in Windows. Give it another try with the whole
45358    # argument.
45359    path="$complete"
45360    arguments="EOL"
45361    new_path="$path"
45362
45363  windows_path="$new_path"
45364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45365    unix_path=`$CYGPATH -u "$windows_path"`
45366    new_path="$unix_path"
45367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45369    new_path="$unix_path"
45370  fi
45371
45372
45373    new_path=`$WHICH "$new_path" 2> /dev/null`
45374    # bat and cmd files are not always considered executable in MSYS causing which
45375    # to not find them
45376    if test "x$new_path" = x \
45377        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45378        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45379      new_path="$path"
45380
45381  windows_path="$new_path"
45382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45383    unix_path=`$CYGPATH -u "$windows_path"`
45384    new_path="$unix_path"
45385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45387    new_path="$unix_path"
45388  fi
45389
45390    fi
45391
45392    if test "x$new_path" = x; then
45393      # It's still not found. Now this is an unrecoverable error.
45394      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45395$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45396      has_space=`$ECHO "$complete" | $GREP " "`
45397      if test "x$has_space" != x; then
45398        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45399$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45400      fi
45401      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45402    fi
45403  fi
45404
45405  # Now new_path has a complete unix path to the binary
45406  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45407    # Keep paths in /bin as-is, but remove trailing .exe if any
45408    new_path="${new_path/%.exe/}"
45409    # Do not save /bin paths to all_fixpath_prefixes!
45410  else
45411    # Not in mixed or Windows style, start by that.
45412    new_path=`cmd //c echo $new_path`
45413
45414  input_path="$new_path"
45415  # Check if we need to convert this using DOS-style short mode. If the path
45416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45417  # take no chances and rewrite it.
45418  # Note: m4 eats our [], so we need to use [ and ] instead.
45419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45420  if test "x$has_forbidden_chars" != x; then
45421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45422    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45423  fi
45424
45425    # Output is in $new_path
45426
45427  windows_path="$new_path"
45428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45429    unix_path=`$CYGPATH -u "$windows_path"`
45430    new_path="$unix_path"
45431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45433    new_path="$unix_path"
45434  fi
45435
45436    # remove trailing .exe if any
45437    new_path="${new_path/%.exe/}"
45438
45439    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45440    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45441  fi
45442
45443    else
45444      # We're on a unix platform. Hooray! :)
45445      # First separate the path from the arguments. This will split at the first
45446      # space.
45447      complete="$BUILD_NM"
45448      path="${complete%% *}"
45449      tmp="$complete EOL"
45450      arguments="${tmp#* }"
45451
45452      # Cannot rely on the command "which" here since it doesn't always work.
45453      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45454      if test -z "$is_absolute_path"; then
45455        # Path to executable is not absolute. Find it.
45456        IFS_save="$IFS"
45457        IFS=:
45458        for p in $PATH; do
45459          if test -f "$p/$path" && test -x "$p/$path"; then
45460            new_path="$p/$path"
45461            break
45462          fi
45463        done
45464        IFS="$IFS_save"
45465      else
45466        # This is an absolute path, we can use it without further modifications.
45467        new_path="$path"
45468      fi
45469
45470      if test "x$new_path" = x; then
45471        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45472$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45473        has_space=`$ECHO "$complete" | $GREP " "`
45474        if test "x$has_space" != x; then
45475          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45476$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45477        fi
45478        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45479      fi
45480    fi
45481
45482    # Now join together the path and the arguments once again
45483    if test "x$arguments" != xEOL; then
45484      new_complete="$new_path ${arguments% *}"
45485    else
45486      new_complete="$new_path"
45487    fi
45488
45489    if test "x$complete" != "x$new_complete"; then
45490      BUILD_NM="$new_complete"
45491      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45492$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45493    fi
45494  fi
45495
45496
45497
45498  # Publish this variable in the help.
45499
45500
45501  if [ -z "${BUILD_AR+x}" ]; then
45502    # The variable is not set by user, try to locate tool using the code snippet
45503    for ac_prog in ar gcc-ar
45504do
45505  # Extract the first word of "$ac_prog", so it can be a program name with args.
45506set dummy $ac_prog; ac_word=$2
45507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45508$as_echo_n "checking for $ac_word... " >&6; }
45509if ${ac_cv_path_BUILD_AR+:} false; then :
45510  $as_echo_n "(cached) " >&6
45511else
45512  case $BUILD_AR in
45513  [\\/]* | ?:[\\/]*)
45514  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45515  ;;
45516  *)
45517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45518for as_dir in $PATH
45519do
45520  IFS=$as_save_IFS
45521  test -z "$as_dir" && as_dir=.
45522    for ac_exec_ext in '' $ac_executable_extensions; do
45523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45524    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45526    break 2
45527  fi
45528done
45529  done
45530IFS=$as_save_IFS
45531
45532  ;;
45533esac
45534fi
45535BUILD_AR=$ac_cv_path_BUILD_AR
45536if test -n "$BUILD_AR"; then
45537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45538$as_echo "$BUILD_AR" >&6; }
45539else
45540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45541$as_echo "no" >&6; }
45542fi
45543
45544
45545  test -n "$BUILD_AR" && break
45546done
45547
45548  else
45549    # The variable is set, but is it from the command line or the environment?
45550
45551    # Try to remove the string !BUILD_AR! from our list.
45552    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45553    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45554      # If it failed, the variable was not from the command line. Ignore it,
45555      # but warn the user (except for BASH, which is always set by the calling BASH).
45556      if test "xBUILD_AR" != xBASH; then
45557        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45558$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45559      fi
45560      # Try to locate tool using the code snippet
45561      for ac_prog in ar gcc-ar
45562do
45563  # Extract the first word of "$ac_prog", so it can be a program name with args.
45564set dummy $ac_prog; ac_word=$2
45565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45566$as_echo_n "checking for $ac_word... " >&6; }
45567if ${ac_cv_path_BUILD_AR+:} false; then :
45568  $as_echo_n "(cached) " >&6
45569else
45570  case $BUILD_AR in
45571  [\\/]* | ?:[\\/]*)
45572  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45573  ;;
45574  *)
45575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45576for as_dir in $PATH
45577do
45578  IFS=$as_save_IFS
45579  test -z "$as_dir" && as_dir=.
45580    for ac_exec_ext in '' $ac_executable_extensions; do
45581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45582    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45584    break 2
45585  fi
45586done
45587  done
45588IFS=$as_save_IFS
45589
45590  ;;
45591esac
45592fi
45593BUILD_AR=$ac_cv_path_BUILD_AR
45594if test -n "$BUILD_AR"; then
45595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45596$as_echo "$BUILD_AR" >&6; }
45597else
45598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45599$as_echo "no" >&6; }
45600fi
45601
45602
45603  test -n "$BUILD_AR" && break
45604done
45605
45606    else
45607      # If it succeeded, then it was overridden by the user. We will use it
45608      # for the tool.
45609
45610      # First remove it from the list of overridden variables, so we can test
45611      # for unknown variables in the end.
45612      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45613
45614      # Check if we try to supply an empty value
45615      if test "x$BUILD_AR" = x; then
45616        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45617$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45618        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45619$as_echo_n "checking for BUILD_AR... " >&6; }
45620        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45621$as_echo "disabled" >&6; }
45622      else
45623        # Check if the provided tool contains a complete path.
45624        tool_specified="$BUILD_AR"
45625        tool_basename="${tool_specified##*/}"
45626        if test "x$tool_basename" = "x$tool_specified"; then
45627          # A command without a complete path is provided, search $PATH.
45628          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45629$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45630          # Extract the first word of "$tool_basename", so it can be a program name with args.
45631set dummy $tool_basename; ac_word=$2
45632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45633$as_echo_n "checking for $ac_word... " >&6; }
45634if ${ac_cv_path_BUILD_AR+:} false; then :
45635  $as_echo_n "(cached) " >&6
45636else
45637  case $BUILD_AR in
45638  [\\/]* | ?:[\\/]*)
45639  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45640  ;;
45641  *)
45642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45643for as_dir in $PATH
45644do
45645  IFS=$as_save_IFS
45646  test -z "$as_dir" && as_dir=.
45647    for ac_exec_ext in '' $ac_executable_extensions; do
45648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45649    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45651    break 2
45652  fi
45653done
45654  done
45655IFS=$as_save_IFS
45656
45657  ;;
45658esac
45659fi
45660BUILD_AR=$ac_cv_path_BUILD_AR
45661if test -n "$BUILD_AR"; then
45662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45663$as_echo "$BUILD_AR" >&6; }
45664else
45665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45666$as_echo "no" >&6; }
45667fi
45668
45669
45670          if test "x$BUILD_AR" = x; then
45671            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45672          fi
45673        else
45674          # Otherwise we believe it is a complete path. Use it as it is.
45675          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45676$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45677          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45678$as_echo_n "checking for BUILD_AR... " >&6; }
45679          if test ! -x "$tool_specified"; then
45680            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45681$as_echo "not found" >&6; }
45682            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45683          fi
45684          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45685$as_echo "$tool_specified" >&6; }
45686        fi
45687      fi
45688    fi
45689
45690  fi
45691
45692
45693
45694  # Only process if variable expands to non-empty
45695
45696  if test "x$BUILD_AR" != x; then
45697    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45698
45699  # First separate the path from the arguments. This will split at the first
45700  # space.
45701  complete="$BUILD_AR"
45702  path="${complete%% *}"
45703  tmp="$complete EOL"
45704  arguments="${tmp#* }"
45705
45706  # Input might be given as Windows format, start by converting to
45707  # unix format.
45708  new_path=`$CYGPATH -u "$path"`
45709
45710  # Now try to locate executable using which
45711  new_path=`$WHICH "$new_path" 2> /dev/null`
45712  # bat and cmd files are not always considered executable in cygwin causing which
45713  # to not find them
45714  if test "x$new_path" = x \
45715      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45716      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45717    new_path=`$CYGPATH -u "$path"`
45718  fi
45719  if test "x$new_path" = x; then
45720    # Oops. Which didn't find the executable.
45721    # The splitting of arguments from the executable at a space might have been incorrect,
45722    # since paths with space are more likely in Windows. Give it another try with the whole
45723    # argument.
45724    path="$complete"
45725    arguments="EOL"
45726    new_path=`$CYGPATH -u "$path"`
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      # It's still not found. Now this is an unrecoverable error.
45737      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45738$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45739      has_space=`$ECHO "$complete" | $GREP " "`
45740      if test "x$has_space" != x; then
45741        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45742$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45743      fi
45744      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45745    fi
45746  fi
45747
45748  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45749  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45750  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45751  # "foo.exe" is OK but "foo" is an error.
45752  #
45753  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45754  # It is also a way to make sure we got the proper file name for the real test later on.
45755  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45756  if test "x$test_shortpath" = x; then
45757    # Short path failed, file does not exist as specified.
45758    # Try adding .exe or .cmd
45759    if test -f "${new_path}.exe"; then
45760      input_to_shortpath="${new_path}.exe"
45761    elif test -f "${new_path}.cmd"; then
45762      input_to_shortpath="${new_path}.cmd"
45763    else
45764      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45765$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45766      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45767$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45768      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45769    fi
45770  else
45771    input_to_shortpath="$new_path"
45772  fi
45773
45774  # Call helper function which possibly converts this using DOS-style short mode.
45775  # If so, the updated path is stored in $new_path.
45776  new_path="$input_to_shortpath"
45777
45778  input_path="$input_to_shortpath"
45779  # Check if we need to convert this using DOS-style short mode. If the path
45780  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45781  # take no chances and rewrite it.
45782  # Note: m4 eats our [], so we need to use [ and ] instead.
45783  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45784  if test "x$has_forbidden_chars" != x; then
45785    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45786    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45787    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45788    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45789      # Going to short mode and back again did indeed matter. Since short mode is
45790      # case insensitive, let's make it lowercase to improve readability.
45791      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45792      # Now convert it back to Unix-style (cygpath)
45793      input_path=`$CYGPATH -u "$shortmode_path"`
45794      new_path="$input_path"
45795    fi
45796  fi
45797
45798  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45799  if test "x$test_cygdrive_prefix" = x; then
45800    # As a simple fix, exclude /usr/bin since it's not a real path.
45801    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45802      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45803      # a path prefixed by /cygdrive for fixpath to work.
45804      new_path="$CYGWIN_ROOT_PATH$input_path"
45805    fi
45806  fi
45807
45808  # remove trailing .exe if any
45809  new_path="${new_path/%.exe/}"
45810
45811    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45812
45813  # First separate the path from the arguments. This will split at the first
45814  # space.
45815  complete="$BUILD_AR"
45816  path="${complete%% *}"
45817  tmp="$complete EOL"
45818  arguments="${tmp#* }"
45819
45820  # Input might be given as Windows format, start by converting to
45821  # unix format.
45822  new_path="$path"
45823
45824  windows_path="$new_path"
45825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45826    unix_path=`$CYGPATH -u "$windows_path"`
45827    new_path="$unix_path"
45828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45829    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45830    new_path="$unix_path"
45831  fi
45832
45833
45834  # Now try to locate executable using which
45835  new_path=`$WHICH "$new_path" 2> /dev/null`
45836
45837  if test "x$new_path" = x; then
45838    # Oops. Which didn't find the executable.
45839    # The splitting of arguments from the executable at a space might have been incorrect,
45840    # since paths with space are more likely in Windows. Give it another try with the whole
45841    # argument.
45842    path="$complete"
45843    arguments="EOL"
45844    new_path="$path"
45845
45846  windows_path="$new_path"
45847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45848    unix_path=`$CYGPATH -u "$windows_path"`
45849    new_path="$unix_path"
45850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45852    new_path="$unix_path"
45853  fi
45854
45855
45856    new_path=`$WHICH "$new_path" 2> /dev/null`
45857    # bat and cmd files are not always considered executable in MSYS causing which
45858    # to not find them
45859    if test "x$new_path" = x \
45860        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45861        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45862      new_path="$path"
45863
45864  windows_path="$new_path"
45865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45866    unix_path=`$CYGPATH -u "$windows_path"`
45867    new_path="$unix_path"
45868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45870    new_path="$unix_path"
45871  fi
45872
45873    fi
45874
45875    if test "x$new_path" = x; then
45876      # It's still not found. Now this is an unrecoverable error.
45877      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45878$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45879      has_space=`$ECHO "$complete" | $GREP " "`
45880      if test "x$has_space" != x; then
45881        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45882$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45883      fi
45884      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45885    fi
45886  fi
45887
45888  # Now new_path has a complete unix path to the binary
45889  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45890    # Keep paths in /bin as-is, but remove trailing .exe if any
45891    new_path="${new_path/%.exe/}"
45892    # Do not save /bin paths to all_fixpath_prefixes!
45893  else
45894    # Not in mixed or Windows style, start by that.
45895    new_path=`cmd //c echo $new_path`
45896
45897  input_path="$new_path"
45898  # Check if we need to convert this using DOS-style short mode. If the path
45899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45900  # take no chances and rewrite it.
45901  # Note: m4 eats our [], so we need to use [ and ] instead.
45902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45903  if test "x$has_forbidden_chars" != x; then
45904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45905    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45906  fi
45907
45908    # Output is in $new_path
45909
45910  windows_path="$new_path"
45911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45912    unix_path=`$CYGPATH -u "$windows_path"`
45913    new_path="$unix_path"
45914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45916    new_path="$unix_path"
45917  fi
45918
45919    # remove trailing .exe if any
45920    new_path="${new_path/%.exe/}"
45921
45922    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45923    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45924  fi
45925
45926    else
45927      # We're on a unix platform. Hooray! :)
45928      # First separate the path from the arguments. This will split at the first
45929      # space.
45930      complete="$BUILD_AR"
45931      path="${complete%% *}"
45932      tmp="$complete EOL"
45933      arguments="${tmp#* }"
45934
45935      # Cannot rely on the command "which" here since it doesn't always work.
45936      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45937      if test -z "$is_absolute_path"; then
45938        # Path to executable is not absolute. Find it.
45939        IFS_save="$IFS"
45940        IFS=:
45941        for p in $PATH; do
45942          if test -f "$p/$path" && test -x "$p/$path"; then
45943            new_path="$p/$path"
45944            break
45945          fi
45946        done
45947        IFS="$IFS_save"
45948      else
45949        # This is an absolute path, we can use it without further modifications.
45950        new_path="$path"
45951      fi
45952
45953      if test "x$new_path" = x; then
45954        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45955$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45956        has_space=`$ECHO "$complete" | $GREP " "`
45957        if test "x$has_space" != x; then
45958          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45959$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45960        fi
45961        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45962      fi
45963    fi
45964
45965    # Now join together the path and the arguments once again
45966    if test "x$arguments" != xEOL; then
45967      new_complete="$new_path ${arguments% *}"
45968    else
45969      new_complete="$new_path"
45970    fi
45971
45972    if test "x$complete" != "x$new_complete"; then
45973      BUILD_AR="$new_complete"
45974      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45975$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45976    fi
45977  fi
45978
45979
45980
45981  # Publish this variable in the help.
45982
45983
45984  if [ -z "${BUILD_OBJCOPY+x}" ]; then
45985    # The variable is not set by user, try to locate tool using the code snippet
45986    for ac_prog in objcopy
45987do
45988  # Extract the first word of "$ac_prog", so it can be a program name with args.
45989set dummy $ac_prog; ac_word=$2
45990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45991$as_echo_n "checking for $ac_word... " >&6; }
45992if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45993  $as_echo_n "(cached) " >&6
45994else
45995  case $BUILD_OBJCOPY in
45996  [\\/]* | ?:[\\/]*)
45997  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45998  ;;
45999  *)
46000  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46001for as_dir in $PATH
46002do
46003  IFS=$as_save_IFS
46004  test -z "$as_dir" && as_dir=.
46005    for ac_exec_ext in '' $ac_executable_extensions; do
46006  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46007    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46008    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46009    break 2
46010  fi
46011done
46012  done
46013IFS=$as_save_IFS
46014
46015  ;;
46016esac
46017fi
46018BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46019if test -n "$BUILD_OBJCOPY"; then
46020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46021$as_echo "$BUILD_OBJCOPY" >&6; }
46022else
46023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46024$as_echo "no" >&6; }
46025fi
46026
46027
46028  test -n "$BUILD_OBJCOPY" && break
46029done
46030
46031  else
46032    # The variable is set, but is it from the command line or the environment?
46033
46034    # Try to remove the string !BUILD_OBJCOPY! from our list.
46035    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46036    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46037      # If it failed, the variable was not from the command line. Ignore it,
46038      # but warn the user (except for BASH, which is always set by the calling BASH).
46039      if test "xBUILD_OBJCOPY" != xBASH; then
46040        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46041$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46042      fi
46043      # Try to locate tool using the code snippet
46044      for ac_prog in objcopy
46045do
46046  # Extract the first word of "$ac_prog", so it can be a program name with args.
46047set dummy $ac_prog; ac_word=$2
46048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46049$as_echo_n "checking for $ac_word... " >&6; }
46050if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46051  $as_echo_n "(cached) " >&6
46052else
46053  case $BUILD_OBJCOPY in
46054  [\\/]* | ?:[\\/]*)
46055  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46056  ;;
46057  *)
46058  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46059for as_dir in $PATH
46060do
46061  IFS=$as_save_IFS
46062  test -z "$as_dir" && as_dir=.
46063    for ac_exec_ext in '' $ac_executable_extensions; do
46064  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46065    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46066    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46067    break 2
46068  fi
46069done
46070  done
46071IFS=$as_save_IFS
46072
46073  ;;
46074esac
46075fi
46076BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46077if test -n "$BUILD_OBJCOPY"; then
46078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46079$as_echo "$BUILD_OBJCOPY" >&6; }
46080else
46081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46082$as_echo "no" >&6; }
46083fi
46084
46085
46086  test -n "$BUILD_OBJCOPY" && break
46087done
46088
46089    else
46090      # If it succeeded, then it was overridden by the user. We will use it
46091      # for the tool.
46092
46093      # First remove it from the list of overridden variables, so we can test
46094      # for unknown variables in the end.
46095      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46096
46097      # Check if we try to supply an empty value
46098      if test "x$BUILD_OBJCOPY" = x; then
46099        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46100$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46101        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46102$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46103        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46104$as_echo "disabled" >&6; }
46105      else
46106        # Check if the provided tool contains a complete path.
46107        tool_specified="$BUILD_OBJCOPY"
46108        tool_basename="${tool_specified##*/}"
46109        if test "x$tool_basename" = "x$tool_specified"; then
46110          # A command without a complete path is provided, search $PATH.
46111          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46112$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46113          # Extract the first word of "$tool_basename", so it can be a program name with args.
46114set dummy $tool_basename; ac_word=$2
46115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46116$as_echo_n "checking for $ac_word... " >&6; }
46117if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46118  $as_echo_n "(cached) " >&6
46119else
46120  case $BUILD_OBJCOPY in
46121  [\\/]* | ?:[\\/]*)
46122  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46123  ;;
46124  *)
46125  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46126for as_dir in $PATH
46127do
46128  IFS=$as_save_IFS
46129  test -z "$as_dir" && as_dir=.
46130    for ac_exec_ext in '' $ac_executable_extensions; do
46131  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46132    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46134    break 2
46135  fi
46136done
46137  done
46138IFS=$as_save_IFS
46139
46140  ;;
46141esac
46142fi
46143BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46144if test -n "$BUILD_OBJCOPY"; then
46145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46146$as_echo "$BUILD_OBJCOPY" >&6; }
46147else
46148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46149$as_echo "no" >&6; }
46150fi
46151
46152
46153          if test "x$BUILD_OBJCOPY" = x; then
46154            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46155          fi
46156        else
46157          # Otherwise we believe it is a complete path. Use it as it is.
46158          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46159$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46160          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46161$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46162          if test ! -x "$tool_specified"; then
46163            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46164$as_echo "not found" >&6; }
46165            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46166          fi
46167          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46168$as_echo "$tool_specified" >&6; }
46169        fi
46170      fi
46171    fi
46172
46173  fi
46174
46175
46176
46177  # Only process if variable expands to non-empty
46178
46179  if test "x$BUILD_OBJCOPY" != x; then
46180    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46181
46182  # First separate the path from the arguments. This will split at the first
46183  # space.
46184  complete="$BUILD_OBJCOPY"
46185  path="${complete%% *}"
46186  tmp="$complete EOL"
46187  arguments="${tmp#* }"
46188
46189  # Input might be given as Windows format, start by converting to
46190  # unix format.
46191  new_path=`$CYGPATH -u "$path"`
46192
46193  # Now try to locate executable using which
46194  new_path=`$WHICH "$new_path" 2> /dev/null`
46195  # bat and cmd files are not always considered executable in cygwin causing which
46196  # to not find them
46197  if test "x$new_path" = x \
46198      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46199      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46200    new_path=`$CYGPATH -u "$path"`
46201  fi
46202  if test "x$new_path" = x; then
46203    # Oops. Which didn't find the executable.
46204    # The splitting of arguments from the executable at a space might have been incorrect,
46205    # since paths with space are more likely in Windows. Give it another try with the whole
46206    # argument.
46207    path="$complete"
46208    arguments="EOL"
46209    new_path=`$CYGPATH -u "$path"`
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      # It's still not found. Now this is an unrecoverable error.
46220      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46221$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46222      has_space=`$ECHO "$complete" | $GREP " "`
46223      if test "x$has_space" != x; then
46224        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46225$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46226      fi
46227      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46228    fi
46229  fi
46230
46231  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46232  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46233  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46234  # "foo.exe" is OK but "foo" is an error.
46235  #
46236  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46237  # It is also a way to make sure we got the proper file name for the real test later on.
46238  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46239  if test "x$test_shortpath" = x; then
46240    # Short path failed, file does not exist as specified.
46241    # Try adding .exe or .cmd
46242    if test -f "${new_path}.exe"; then
46243      input_to_shortpath="${new_path}.exe"
46244    elif test -f "${new_path}.cmd"; then
46245      input_to_shortpath="${new_path}.cmd"
46246    else
46247      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46248$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46249      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46250$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46251      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46252    fi
46253  else
46254    input_to_shortpath="$new_path"
46255  fi
46256
46257  # Call helper function which possibly converts this using DOS-style short mode.
46258  # If so, the updated path is stored in $new_path.
46259  new_path="$input_to_shortpath"
46260
46261  input_path="$input_to_shortpath"
46262  # Check if we need to convert this using DOS-style short mode. If the path
46263  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46264  # take no chances and rewrite it.
46265  # Note: m4 eats our [], so we need to use [ and ] instead.
46266  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46267  if test "x$has_forbidden_chars" != x; then
46268    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46269    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46270    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46271    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46272      # Going to short mode and back again did indeed matter. Since short mode is
46273      # case insensitive, let's make it lowercase to improve readability.
46274      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46275      # Now convert it back to Unix-style (cygpath)
46276      input_path=`$CYGPATH -u "$shortmode_path"`
46277      new_path="$input_path"
46278    fi
46279  fi
46280
46281  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46282  if test "x$test_cygdrive_prefix" = x; then
46283    # As a simple fix, exclude /usr/bin since it's not a real path.
46284    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46285      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46286      # a path prefixed by /cygdrive for fixpath to work.
46287      new_path="$CYGWIN_ROOT_PATH$input_path"
46288    fi
46289  fi
46290
46291  # remove trailing .exe if any
46292  new_path="${new_path/%.exe/}"
46293
46294    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46295
46296  # First separate the path from the arguments. This will split at the first
46297  # space.
46298  complete="$BUILD_OBJCOPY"
46299  path="${complete%% *}"
46300  tmp="$complete EOL"
46301  arguments="${tmp#* }"
46302
46303  # Input might be given as Windows format, start by converting to
46304  # unix format.
46305  new_path="$path"
46306
46307  windows_path="$new_path"
46308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46309    unix_path=`$CYGPATH -u "$windows_path"`
46310    new_path="$unix_path"
46311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46313    new_path="$unix_path"
46314  fi
46315
46316
46317  # Now try to locate executable using which
46318  new_path=`$WHICH "$new_path" 2> /dev/null`
46319
46320  if test "x$new_path" = x; then
46321    # Oops. Which didn't find the executable.
46322    # The splitting of arguments from the executable at a space might have been incorrect,
46323    # since paths with space are more likely in Windows. Give it another try with the whole
46324    # argument.
46325    path="$complete"
46326    arguments="EOL"
46327    new_path="$path"
46328
46329  windows_path="$new_path"
46330  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46331    unix_path=`$CYGPATH -u "$windows_path"`
46332    new_path="$unix_path"
46333  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46334    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46335    new_path="$unix_path"
46336  fi
46337
46338
46339    new_path=`$WHICH "$new_path" 2> /dev/null`
46340    # bat and cmd files are not always considered executable in MSYS causing which
46341    # to not find them
46342    if test "x$new_path" = x \
46343        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46344        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46345      new_path="$path"
46346
46347  windows_path="$new_path"
46348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46349    unix_path=`$CYGPATH -u "$windows_path"`
46350    new_path="$unix_path"
46351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46353    new_path="$unix_path"
46354  fi
46355
46356    fi
46357
46358    if test "x$new_path" = x; then
46359      # It's still not found. Now this is an unrecoverable error.
46360      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46361$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46362      has_space=`$ECHO "$complete" | $GREP " "`
46363      if test "x$has_space" != x; then
46364        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46365$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46366      fi
46367      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46368    fi
46369  fi
46370
46371  # Now new_path has a complete unix path to the binary
46372  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46373    # Keep paths in /bin as-is, but remove trailing .exe if any
46374    new_path="${new_path/%.exe/}"
46375    # Do not save /bin paths to all_fixpath_prefixes!
46376  else
46377    # Not in mixed or Windows style, start by that.
46378    new_path=`cmd //c echo $new_path`
46379
46380  input_path="$new_path"
46381  # Check if we need to convert this using DOS-style short mode. If the path
46382  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46383  # take no chances and rewrite it.
46384  # Note: m4 eats our [], so we need to use [ and ] instead.
46385  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46386  if test "x$has_forbidden_chars" != x; then
46387    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46388    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46389  fi
46390
46391    # Output is in $new_path
46392
46393  windows_path="$new_path"
46394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46395    unix_path=`$CYGPATH -u "$windows_path"`
46396    new_path="$unix_path"
46397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46399    new_path="$unix_path"
46400  fi
46401
46402    # remove trailing .exe if any
46403    new_path="${new_path/%.exe/}"
46404
46405    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46406    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46407  fi
46408
46409    else
46410      # We're on a unix platform. Hooray! :)
46411      # First separate the path from the arguments. This will split at the first
46412      # space.
46413      complete="$BUILD_OBJCOPY"
46414      path="${complete%% *}"
46415      tmp="$complete EOL"
46416      arguments="${tmp#* }"
46417
46418      # Cannot rely on the command "which" here since it doesn't always work.
46419      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46420      if test -z "$is_absolute_path"; then
46421        # Path to executable is not absolute. Find it.
46422        IFS_save="$IFS"
46423        IFS=:
46424        for p in $PATH; do
46425          if test -f "$p/$path" && test -x "$p/$path"; then
46426            new_path="$p/$path"
46427            break
46428          fi
46429        done
46430        IFS="$IFS_save"
46431      else
46432        # This is an absolute path, we can use it without further modifications.
46433        new_path="$path"
46434      fi
46435
46436      if test "x$new_path" = x; then
46437        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46438$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46439        has_space=`$ECHO "$complete" | $GREP " "`
46440        if test "x$has_space" != x; then
46441          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46442$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46443        fi
46444        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46445      fi
46446    fi
46447
46448    # Now join together the path and the arguments once again
46449    if test "x$arguments" != xEOL; then
46450      new_complete="$new_path ${arguments% *}"
46451    else
46452      new_complete="$new_path"
46453    fi
46454
46455    if test "x$complete" != "x$new_complete"; then
46456      BUILD_OBJCOPY="$new_complete"
46457      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
46458$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
46459    fi
46460  fi
46461
46462
46463
46464  # Publish this variable in the help.
46465
46466
46467  if [ -z "${BUILD_STRIP+x}" ]; then
46468    # The variable is not set by user, try to locate tool using the code snippet
46469    for ac_prog in strip
46470do
46471  # Extract the first word of "$ac_prog", so it can be a program name with args.
46472set dummy $ac_prog; ac_word=$2
46473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46474$as_echo_n "checking for $ac_word... " >&6; }
46475if ${ac_cv_path_BUILD_STRIP+:} false; then :
46476  $as_echo_n "(cached) " >&6
46477else
46478  case $BUILD_STRIP in
46479  [\\/]* | ?:[\\/]*)
46480  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46481  ;;
46482  *)
46483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46484for as_dir in $PATH
46485do
46486  IFS=$as_save_IFS
46487  test -z "$as_dir" && as_dir=.
46488    for ac_exec_ext in '' $ac_executable_extensions; do
46489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46490    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46492    break 2
46493  fi
46494done
46495  done
46496IFS=$as_save_IFS
46497
46498  ;;
46499esac
46500fi
46501BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46502if test -n "$BUILD_STRIP"; then
46503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46504$as_echo "$BUILD_STRIP" >&6; }
46505else
46506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46507$as_echo "no" >&6; }
46508fi
46509
46510
46511  test -n "$BUILD_STRIP" && break
46512done
46513
46514  else
46515    # The variable is set, but is it from the command line or the environment?
46516
46517    # Try to remove the string !BUILD_STRIP! from our list.
46518    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46519    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46520      # If it failed, the variable was not from the command line. Ignore it,
46521      # but warn the user (except for BASH, which is always set by the calling BASH).
46522      if test "xBUILD_STRIP" != xBASH; then
46523        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46524$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46525      fi
46526      # Try to locate tool using the code snippet
46527      for ac_prog in strip
46528do
46529  # Extract the first word of "$ac_prog", so it can be a program name with args.
46530set dummy $ac_prog; ac_word=$2
46531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46532$as_echo_n "checking for $ac_word... " >&6; }
46533if ${ac_cv_path_BUILD_STRIP+:} false; then :
46534  $as_echo_n "(cached) " >&6
46535else
46536  case $BUILD_STRIP in
46537  [\\/]* | ?:[\\/]*)
46538  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46539  ;;
46540  *)
46541  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46542for as_dir in $PATH
46543do
46544  IFS=$as_save_IFS
46545  test -z "$as_dir" && as_dir=.
46546    for ac_exec_ext in '' $ac_executable_extensions; do
46547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46548    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46550    break 2
46551  fi
46552done
46553  done
46554IFS=$as_save_IFS
46555
46556  ;;
46557esac
46558fi
46559BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46560if test -n "$BUILD_STRIP"; then
46561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46562$as_echo "$BUILD_STRIP" >&6; }
46563else
46564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46565$as_echo "no" >&6; }
46566fi
46567
46568
46569  test -n "$BUILD_STRIP" && break
46570done
46571
46572    else
46573      # If it succeeded, then it was overridden by the user. We will use it
46574      # for the tool.
46575
46576      # First remove it from the list of overridden variables, so we can test
46577      # for unknown variables in the end.
46578      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46579
46580      # Check if we try to supply an empty value
46581      if test "x$BUILD_STRIP" = x; then
46582        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46583$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46584        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46585$as_echo_n "checking for BUILD_STRIP... " >&6; }
46586        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46587$as_echo "disabled" >&6; }
46588      else
46589        # Check if the provided tool contains a complete path.
46590        tool_specified="$BUILD_STRIP"
46591        tool_basename="${tool_specified##*/}"
46592        if test "x$tool_basename" = "x$tool_specified"; then
46593          # A command without a complete path is provided, search $PATH.
46594          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46595$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46596          # Extract the first word of "$tool_basename", so it can be a program name with args.
46597set dummy $tool_basename; ac_word=$2
46598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46599$as_echo_n "checking for $ac_word... " >&6; }
46600if ${ac_cv_path_BUILD_STRIP+:} false; then :
46601  $as_echo_n "(cached) " >&6
46602else
46603  case $BUILD_STRIP in
46604  [\\/]* | ?:[\\/]*)
46605  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46606  ;;
46607  *)
46608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46609for as_dir in $PATH
46610do
46611  IFS=$as_save_IFS
46612  test -z "$as_dir" && as_dir=.
46613    for ac_exec_ext in '' $ac_executable_extensions; do
46614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46615    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46617    break 2
46618  fi
46619done
46620  done
46621IFS=$as_save_IFS
46622
46623  ;;
46624esac
46625fi
46626BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46627if test -n "$BUILD_STRIP"; then
46628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46629$as_echo "$BUILD_STRIP" >&6; }
46630else
46631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46632$as_echo "no" >&6; }
46633fi
46634
46635
46636          if test "x$BUILD_STRIP" = x; then
46637            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46638          fi
46639        else
46640          # Otherwise we believe it is a complete path. Use it as it is.
46641          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46642$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46643          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46644$as_echo_n "checking for BUILD_STRIP... " >&6; }
46645          if test ! -x "$tool_specified"; then
46646            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46647$as_echo "not found" >&6; }
46648            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46649          fi
46650          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46651$as_echo "$tool_specified" >&6; }
46652        fi
46653      fi
46654    fi
46655
46656  fi
46657
46658
46659
46660  # Only process if variable expands to non-empty
46661
46662  if test "x$BUILD_STRIP" != x; then
46663    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46664
46665  # First separate the path from the arguments. This will split at the first
46666  # space.
46667  complete="$BUILD_STRIP"
46668  path="${complete%% *}"
46669  tmp="$complete EOL"
46670  arguments="${tmp#* }"
46671
46672  # Input might be given as Windows format, start by converting to
46673  # unix format.
46674  new_path=`$CYGPATH -u "$path"`
46675
46676  # Now try to locate executable using which
46677  new_path=`$WHICH "$new_path" 2> /dev/null`
46678  # bat and cmd files are not always considered executable in cygwin causing which
46679  # to not find them
46680  if test "x$new_path" = x \
46681      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46682      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46683    new_path=`$CYGPATH -u "$path"`
46684  fi
46685  if test "x$new_path" = x; then
46686    # Oops. Which didn't find the executable.
46687    # The splitting of arguments from the executable at a space might have been incorrect,
46688    # since paths with space are more likely in Windows. Give it another try with the whole
46689    # argument.
46690    path="$complete"
46691    arguments="EOL"
46692    new_path=`$CYGPATH -u "$path"`
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      # It's still not found. Now this is an unrecoverable error.
46703      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46704$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46705      has_space=`$ECHO "$complete" | $GREP " "`
46706      if test "x$has_space" != x; then
46707        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46708$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46709      fi
46710      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46711    fi
46712  fi
46713
46714  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46715  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46716  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46717  # "foo.exe" is OK but "foo" is an error.
46718  #
46719  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46720  # It is also a way to make sure we got the proper file name for the real test later on.
46721  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46722  if test "x$test_shortpath" = x; then
46723    # Short path failed, file does not exist as specified.
46724    # Try adding .exe or .cmd
46725    if test -f "${new_path}.exe"; then
46726      input_to_shortpath="${new_path}.exe"
46727    elif test -f "${new_path}.cmd"; then
46728      input_to_shortpath="${new_path}.cmd"
46729    else
46730      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46731$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46732      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46733$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46734      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46735    fi
46736  else
46737    input_to_shortpath="$new_path"
46738  fi
46739
46740  # Call helper function which possibly converts this using DOS-style short mode.
46741  # If so, the updated path is stored in $new_path.
46742  new_path="$input_to_shortpath"
46743
46744  input_path="$input_to_shortpath"
46745  # Check if we need to convert this using DOS-style short mode. If the path
46746  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46747  # take no chances and rewrite it.
46748  # Note: m4 eats our [], so we need to use [ and ] instead.
46749  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46750  if test "x$has_forbidden_chars" != x; then
46751    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46752    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46753    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46754    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46755      # Going to short mode and back again did indeed matter. Since short mode is
46756      # case insensitive, let's make it lowercase to improve readability.
46757      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46758      # Now convert it back to Unix-style (cygpath)
46759      input_path=`$CYGPATH -u "$shortmode_path"`
46760      new_path="$input_path"
46761    fi
46762  fi
46763
46764  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46765  if test "x$test_cygdrive_prefix" = x; then
46766    # As a simple fix, exclude /usr/bin since it's not a real path.
46767    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46768      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46769      # a path prefixed by /cygdrive for fixpath to work.
46770      new_path="$CYGWIN_ROOT_PATH$input_path"
46771    fi
46772  fi
46773
46774  # remove trailing .exe if any
46775  new_path="${new_path/%.exe/}"
46776
46777    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46778
46779  # First separate the path from the arguments. This will split at the first
46780  # space.
46781  complete="$BUILD_STRIP"
46782  path="${complete%% *}"
46783  tmp="$complete EOL"
46784  arguments="${tmp#* }"
46785
46786  # Input might be given as Windows format, start by converting to
46787  # unix format.
46788  new_path="$path"
46789
46790  windows_path="$new_path"
46791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46792    unix_path=`$CYGPATH -u "$windows_path"`
46793    new_path="$unix_path"
46794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46795    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46796    new_path="$unix_path"
46797  fi
46798
46799
46800  # Now try to locate executable using which
46801  new_path=`$WHICH "$new_path" 2> /dev/null`
46802
46803  if test "x$new_path" = x; then
46804    # Oops. Which didn't find the executable.
46805    # The splitting of arguments from the executable at a space might have been incorrect,
46806    # since paths with space are more likely in Windows. Give it another try with the whole
46807    # argument.
46808    path="$complete"
46809    arguments="EOL"
46810    new_path="$path"
46811
46812  windows_path="$new_path"
46813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46814    unix_path=`$CYGPATH -u "$windows_path"`
46815    new_path="$unix_path"
46816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46818    new_path="$unix_path"
46819  fi
46820
46821
46822    new_path=`$WHICH "$new_path" 2> /dev/null`
46823    # bat and cmd files are not always considered executable in MSYS causing which
46824    # to not find them
46825    if test "x$new_path" = x \
46826        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46827        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46828      new_path="$path"
46829
46830  windows_path="$new_path"
46831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46832    unix_path=`$CYGPATH -u "$windows_path"`
46833    new_path="$unix_path"
46834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46836    new_path="$unix_path"
46837  fi
46838
46839    fi
46840
46841    if test "x$new_path" = x; then
46842      # It's still not found. Now this is an unrecoverable error.
46843      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46844$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46845      has_space=`$ECHO "$complete" | $GREP " "`
46846      if test "x$has_space" != x; then
46847        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46848$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46849      fi
46850      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46851    fi
46852  fi
46853
46854  # Now new_path has a complete unix path to the binary
46855  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46856    # Keep paths in /bin as-is, but remove trailing .exe if any
46857    new_path="${new_path/%.exe/}"
46858    # Do not save /bin paths to all_fixpath_prefixes!
46859  else
46860    # Not in mixed or Windows style, start by that.
46861    new_path=`cmd //c echo $new_path`
46862
46863  input_path="$new_path"
46864  # Check if we need to convert this using DOS-style short mode. If the path
46865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46866  # take no chances and rewrite it.
46867  # Note: m4 eats our [], so we need to use [ and ] instead.
46868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46869  if test "x$has_forbidden_chars" != x; then
46870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46871    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46872  fi
46873
46874    # Output is in $new_path
46875
46876  windows_path="$new_path"
46877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46878    unix_path=`$CYGPATH -u "$windows_path"`
46879    new_path="$unix_path"
46880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46882    new_path="$unix_path"
46883  fi
46884
46885    # remove trailing .exe if any
46886    new_path="${new_path/%.exe/}"
46887
46888    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46889    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46890  fi
46891
46892    else
46893      # We're on a unix platform. Hooray! :)
46894      # First separate the path from the arguments. This will split at the first
46895      # space.
46896      complete="$BUILD_STRIP"
46897      path="${complete%% *}"
46898      tmp="$complete EOL"
46899      arguments="${tmp#* }"
46900
46901      # Cannot rely on the command "which" here since it doesn't always work.
46902      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46903      if test -z "$is_absolute_path"; then
46904        # Path to executable is not absolute. Find it.
46905        IFS_save="$IFS"
46906        IFS=:
46907        for p in $PATH; do
46908          if test -f "$p/$path" && test -x "$p/$path"; then
46909            new_path="$p/$path"
46910            break
46911          fi
46912        done
46913        IFS="$IFS_save"
46914      else
46915        # This is an absolute path, we can use it without further modifications.
46916        new_path="$path"
46917      fi
46918
46919      if test "x$new_path" = x; then
46920        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46921$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46922        has_space=`$ECHO "$complete" | $GREP " "`
46923        if test "x$has_space" != x; then
46924          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46925$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46926        fi
46927        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46928      fi
46929    fi
46930
46931    # Now join together the path and the arguments once again
46932    if test "x$arguments" != xEOL; then
46933      new_complete="$new_path ${arguments% *}"
46934    else
46935      new_complete="$new_path"
46936    fi
46937
46938    if test "x$complete" != "x$new_complete"; then
46939      BUILD_STRIP="$new_complete"
46940      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46941$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46942    fi
46943  fi
46944
46945    # Assume the C compiler is the assembler
46946    BUILD_AS="$BUILD_CC -c"
46947    # Just like for the target compiler, use the compiler as linker
46948    BUILD_LD="$BUILD_CC"
46949    BUILD_LDCXX="$BUILD_CXX"
46950
46951    PATH="$OLDPATH"
46952
46953
46954  COMPILER=$BUILD_CC
46955  COMPILER_NAME=BuildC
46956
46957  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46958    # cc -V output typically looks like
46959    #     cc: Sun C 5.12 Linux_i386 2011/11/16
46960    # or
46961    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
46962    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
46963    # Check that this is likely to be the Solaris Studio cc.
46964    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
46965    if test $? -ne 0; then
46966      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46967      { $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
46968$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46969      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46970$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46971      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46972$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46973      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46974    fi
46975    # Remove usage instructions (if present), and
46976    # collapse compiler output into a single line
46977    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
46978        $SED -e 's/ *[Uu]sage:.*//'`
46979    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46980        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
46981  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
46982    # xlc -qversion output typically looks like
46983    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
46984    #     Version: 11.01.0000.0015
46985    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
46986    # Check that this is likely to be the IBM XL C compiler.
46987    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
46988    if test $? -ne 0; then
46989      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46990      { $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
46991$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46992      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46993$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46994      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46995$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46996      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46997    fi
46998    # Collapse compiler output into a single line
46999    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47000    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47001        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47002  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47003    # There is no specific version flag, but all output starts with a version string.
47004    # First line typically looks something like:
47005    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47006    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47007    # Check that this is likely to be Microsoft CL.EXE.
47008    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47009    if test $? -ne 0; then
47010      { $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
47011$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47012      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47013$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47014      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47015    fi
47016    # Collapse compiler output into a single line
47017    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47018    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47019        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47020  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47021    # gcc --version output typically looks like
47022    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47023    #     Copyright (C) 2013 Free Software Foundation, Inc.
47024    #     This is free software; see the source for copying conditions.  There is NO
47025    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47026    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47027    # Check that this is likely to be GCC.
47028    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47029    if test $? -ne 0; then
47030      { $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
47031$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47032      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47033$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47034      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47035    fi
47036    # Remove Copyright and legalese from version string, and
47037    # collapse into a single line
47038    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47039        $SED -e 's/ *Copyright .*//'`
47040    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47041        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47042  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47043    # clang --version output typically looks like
47044    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47045    #    clang version 3.3 (tags/RELEASE_33/final)
47046    # or
47047    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47048    #    Target: x86_64-pc-linux-gnu
47049    #    Thread model: posix
47050    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47051    # Check that this is likely to be clang
47052    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47053    if test $? -ne 0; then
47054      { $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
47055$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47056      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47057$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47058      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47059    fi
47060    # Collapse compiler output into a single line
47061    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47062    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47063        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47064  else
47065      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47066  fi
47067  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47068  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47069  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47070  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47071
47072  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47073$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47074
47075
47076  COMPILER=$BUILD_CXX
47077  COMPILER_NAME=BuildC++
47078
47079  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47080    # cc -V output typically looks like
47081    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47082    # or
47083    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47084    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47085    # Check that this is likely to be the Solaris Studio cc.
47086    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47087    if test $? -ne 0; then
47088      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47089      { $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
47090$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47091      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47092$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47093      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47094$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47095      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47096    fi
47097    # Remove usage instructions (if present), and
47098    # collapse compiler output into a single line
47099    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47100        $SED -e 's/ *[Uu]sage:.*//'`
47101    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47102        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47103  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47104    # xlc -qversion output typically looks like
47105    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47106    #     Version: 11.01.0000.0015
47107    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47108    # Check that this is likely to be the IBM XL C compiler.
47109    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47110    if test $? -ne 0; then
47111      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47112      { $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
47113$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47114      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47115$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47116      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47117$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47118      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47119    fi
47120    # Collapse compiler output into a single line
47121    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47122    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47123        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47124  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47125    # There is no specific version flag, but all output starts with a version string.
47126    # First line typically looks something like:
47127    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47128    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47129    # Check that this is likely to be Microsoft CL.EXE.
47130    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47131    if test $? -ne 0; then
47132      { $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
47133$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47134      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47135$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47136      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47137    fi
47138    # Collapse compiler output into a single line
47139    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47140    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47141        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47142  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47143    # gcc --version output typically looks like
47144    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47145    #     Copyright (C) 2013 Free Software Foundation, Inc.
47146    #     This is free software; see the source for copying conditions.  There is NO
47147    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47148    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47149    # Check that this is likely to be GCC.
47150    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47151    if test $? -ne 0; then
47152      { $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
47153$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47154      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47155$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47156      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47157    fi
47158    # Remove Copyright and legalese from version string, and
47159    # collapse into a single line
47160    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47161        $SED -e 's/ *Copyright .*//'`
47162    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47163        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47164  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47165    # clang --version output typically looks like
47166    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47167    #    clang version 3.3 (tags/RELEASE_33/final)
47168    # or
47169    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47170    #    Target: x86_64-pc-linux-gnu
47171    #    Thread model: posix
47172    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47173    # Check that this is likely to be clang
47174    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47175    if test $? -ne 0; then
47176      { $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
47177$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47178      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47179$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47180      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47181    fi
47182    # Collapse compiler output into a single line
47183    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47184    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47185        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47186  else
47187      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47188  fi
47189  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47190  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47191  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47192  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47193
47194  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47195$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47196
47197
47198  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47199    { $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
47200$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47201    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47202$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47203  fi
47204
47205  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47206  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47207    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47208$as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47209  fi
47210
47211  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47212    { $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
47213$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47214  fi
47215
47216  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47217
47218  else
47219    # If we are not cross compiling, use the normal target compilers for
47220    # building the build platform executables.
47221    BUILD_CC="$CC"
47222    BUILD_CXX="$CXX"
47223    BUILD_LD="$LD"
47224    BUILD_LDCXX="$LDCXX"
47225    BUILD_NM="$NM"
47226    BUILD_AS="$AS"
47227    BUILD_OBJCOPY="$OBJCOPY"
47228    BUILD_STRIP="$STRIP"
47229    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47230    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47231    BUILD_AR="$AR"
47232
47233
47234  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
47235    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
47236$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
47237    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47238$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47239  fi
47240
47241  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47242  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47243    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47244$as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47245  fi
47246
47247  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47248    { $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
47249$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47250  fi
47251
47252  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
47253
47254  fi
47255
47256
47257
47258
47259
47260
47261
47262
47263
47264
47265
47266
47267
47268
47269  # The package path is used only on macosx?
47270  # FIXME: clean this up, and/or move it elsewhere.
47271  PACKAGE_PATH=/opt/local
47272
47273
47274  # Check for extra potential brokenness.
47275  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47276    # On Windows, double-check that we got the right compiler.
47277    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47278    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47279    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47280      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47281        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
47282      fi
47283    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47284      if test "x$COMPILER_CPU_TEST" != "xx64"; then
47285        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47286      fi
47287    fi
47288  fi
47289
47290  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47291    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47292    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47293    # This is later checked when setting flags.
47294
47295    # "-Og" suppported for GCC 4.8 and later
47296    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
47297
47298
47299
47300
47301
47302
47303
47304
47305
47306
47307
47308
47309
47310
47311
47312
47313
47314
47315
47316
47317
47318
47319
47320
47321
47322
47323
47324
47325
47326
47327
47328
47329
47330
47331
47332
47333
47334
47335
47336
47337
47338
47339
47340
47341
47342
47343
47344    # Execute function body
47345
47346
47347
47348
47349
47350
47351
47352
47353
47354
47355
47356
47357
47358
47359
47360
47361
47362
47363
47364
47365
47366
47367
47368
47369
47370
47371
47372
47373
47374
47375
47376
47377
47378
47379
47380
47381
47382
47383
47384
47385
47386
47387
47388
47389
47390
47391
47392
47393    # Execute function body
47394
47395  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47396$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47397  supports=yes
47398
47399  saved_cflags="$CFLAGS"
47400  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
47401  ac_ext=c
47402ac_cpp='$CPP $CPPFLAGS'
47403ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47404ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47405ac_compiler_gnu=$ac_cv_c_compiler_gnu
47406
47407  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47408/* end confdefs.h.  */
47409int i;
47410_ACEOF
47411if ac_fn_c_try_compile "$LINENO"; then :
47412
47413else
47414  supports=no
47415fi
47416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47417  ac_ext=cpp
47418ac_cpp='$CXXCPP $CPPFLAGS'
47419ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47420ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47421ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47422
47423  CFLAGS="$saved_cflags"
47424
47425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47426$as_echo "$supports" >&6; }
47427  if test "x$supports" = "xyes" ; then
47428    :
47429    C_COMP_SUPPORTS="yes"
47430  else
47431    :
47432    C_COMP_SUPPORTS="no"
47433  fi
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
47468
47469
47470
47471
47472
47473
47474
47475
47476
47477
47478
47479
47480
47481
47482
47483
47484
47485
47486
47487
47488
47489
47490
47491
47492
47493    # Execute function body
47494
47495  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47496$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47497  supports=yes
47498
47499  saved_cxxflags="$CXXFLAGS"
47500  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47501  ac_ext=cpp
47502ac_cpp='$CXXCPP $CPPFLAGS'
47503ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47504ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47505ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47506
47507  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47508/* end confdefs.h.  */
47509int i;
47510_ACEOF
47511if ac_fn_cxx_try_compile "$LINENO"; then :
47512
47513else
47514  supports=no
47515fi
47516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47517  ac_ext=cpp
47518ac_cpp='$CXXCPP $CPPFLAGS'
47519ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47520ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47521ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47522
47523  CXXFLAGS="$saved_cxxflags"
47524
47525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47526$as_echo "$supports" >&6; }
47527  if test "x$supports" = "xyes" ; then
47528    :
47529    CXX_COMP_SUPPORTS="yes"
47530  else
47531    :
47532    CXX_COMP_SUPPORTS="no"
47533  fi
47534
47535
47536
47537
47538
47539
47540
47541
47542
47543
47544
47545
47546
47547  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47548$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47549  supports=no
47550  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47551
47552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47553$as_echo "$supports" >&6; }
47554  if test "x$supports" = "xyes" ; then
47555    :
47556    HAS_CFLAG_OPTIMIZE_DEBUG=true
47557  else
47558    :
47559    HAS_CFLAG_OPTIMIZE_DEBUG=false
47560  fi
47561
47562
47563
47564
47565
47566
47567
47568    # "-z relro" supported in GNU binutils 2.17 and later
47569    LINKER_RELRO_FLAG="-Wl,-z,relro"
47570
47571
47572
47573
47574
47575
47576
47577
47578
47579
47580
47581
47582
47583
47584
47585
47586
47587
47588
47589
47590
47591
47592
47593
47594
47595
47596
47597
47598
47599
47600
47601
47602
47603
47604
47605
47606
47607
47608
47609
47610
47611
47612
47613
47614
47615
47616
47617    # Execute function body
47618
47619  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47620$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47621  supports=yes
47622
47623  saved_ldflags="$LDFLAGS"
47624  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47625  ac_ext=c
47626ac_cpp='$CPP $CPPFLAGS'
47627ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47628ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47629ac_compiler_gnu=$ac_cv_c_compiler_gnu
47630
47631  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47632/* end confdefs.h.  */
47633
47634int
47635main ()
47636{
47637
47638  ;
47639  return 0;
47640}
47641_ACEOF
47642if ac_fn_c_try_link "$LINENO"; then :
47643
47644else
47645  supports=no
47646fi
47647rm -f core conftest.err conftest.$ac_objext \
47648    conftest$ac_exeext conftest.$ac_ext
47649  ac_ext=cpp
47650ac_cpp='$CXXCPP $CPPFLAGS'
47651ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47652ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47653ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47654
47655  LDFLAGS="$saved_ldflags"
47656
47657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47658$as_echo "$supports" >&6; }
47659  if test "x$supports" = "xyes" ; then
47660    :
47661    HAS_LINKER_RELRO=true
47662  else
47663    :
47664    HAS_LINKER_RELRO=false
47665  fi
47666
47667
47668
47669
47670
47671
47672
47673
47674
47675
47676
47677
47678
47679    # "-z now" supported in GNU binutils 2.11 and later
47680    LINKER_NOW_FLAG="-Wl,-z,now"
47681
47682
47683
47684
47685
47686
47687
47688
47689
47690
47691
47692
47693
47694
47695
47696
47697
47698
47699
47700
47701
47702
47703
47704
47705
47706
47707
47708
47709
47710
47711
47712
47713
47714
47715
47716
47717
47718
47719
47720
47721
47722
47723
47724
47725
47726
47727
47728    # Execute function body
47729
47730  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47731$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47732  supports=yes
47733
47734  saved_ldflags="$LDFLAGS"
47735  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47736  ac_ext=c
47737ac_cpp='$CPP $CPPFLAGS'
47738ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47739ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47740ac_compiler_gnu=$ac_cv_c_compiler_gnu
47741
47742  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47743/* end confdefs.h.  */
47744
47745int
47746main ()
47747{
47748
47749  ;
47750  return 0;
47751}
47752_ACEOF
47753if ac_fn_c_try_link "$LINENO"; then :
47754
47755else
47756  supports=no
47757fi
47758rm -f core conftest.err conftest.$ac_objext \
47759    conftest$ac_exeext conftest.$ac_ext
47760  ac_ext=cpp
47761ac_cpp='$CXXCPP $CPPFLAGS'
47762ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47763ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47764ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47765
47766  LDFLAGS="$saved_ldflags"
47767
47768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47769$as_echo "$supports" >&6; }
47770  if test "x$supports" = "xyes" ; then
47771    :
47772    HAS_LINKER_NOW=true
47773  else
47774    :
47775    HAS_LINKER_NOW=false
47776  fi
47777
47778
47779
47780
47781
47782
47783
47784
47785
47786
47787
47788
47789  fi
47790
47791  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47792  # in executable.'
47793  USING_BROKEN_SUSE_LD=no
47794  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47795    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47796$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47797    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47798    $ECHO "int main() { }" > main.c
47799    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47800      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47801$as_echo "no" >&6; }
47802      USING_BROKEN_SUSE_LD=no
47803    else
47804      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47805$as_echo "yes" >&6; }
47806      USING_BROKEN_SUSE_LD=yes
47807    fi
47808    $RM version-script.map main.c a.out
47809  fi
47810
47811
47812  # Setup hotspot lecagy names for toolchains
47813  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47814  if test "x$TOOLCHAIN_TYPE" = xclang; then
47815    HOTSPOT_TOOLCHAIN_TYPE=gcc
47816  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47817    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47818  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47819    HOTSPOT_TOOLCHAIN_TYPE=visCPP
47820  fi
47821
47822
47823
47824# Setup the JTReg Regression Test Harness.
47825
47826
47827# Check whether --with-jtreg was given.
47828if test "${with_jtreg+set}" = set; then :
47829  withval=$with_jtreg;
47830else
47831  with_jtreg=no
47832fi
47833
47834
47835  if test "x$with_jtreg" = xno; then
47836    # jtreg disabled
47837    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47838$as_echo_n "checking for jtreg... " >&6; }
47839    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47840$as_echo "no" >&6; }
47841  else
47842    if test "x$with_jtreg" != xyes; then
47843      # with path specified.
47844      JT_HOME="$with_jtreg"
47845    fi
47846
47847    if test "x$JT_HOME" != x; then
47848      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47849$as_echo_n "checking for jtreg... " >&6; }
47850
47851      # use JT_HOME enviroment var.
47852
47853  # Only process if variable expands to non-empty
47854
47855  if test "x$JT_HOME" != x; then
47856    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47857
47858  # Input might be given as Windows format, start by converting to
47859  # unix format.
47860  path="$JT_HOME"
47861  new_path=`$CYGPATH -u "$path"`
47862
47863  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47864  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47865  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47866  # "foo.exe" is OK but "foo" is an error.
47867  #
47868  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47869  # It is also a way to make sure we got the proper file name for the real test later on.
47870  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47871  if test "x$test_shortpath" = x; then
47872    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47873$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47874    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47875  fi
47876
47877  # Call helper function which possibly converts this using DOS-style short mode.
47878  # If so, the updated path is stored in $new_path.
47879
47880  input_path="$new_path"
47881  # Check if we need to convert this using DOS-style short mode. If the path
47882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47883  # take no chances and rewrite it.
47884  # Note: m4 eats our [], so we need to use [ and ] instead.
47885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47886  if test "x$has_forbidden_chars" != x; then
47887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47888    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47889    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47890    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47891      # Going to short mode and back again did indeed matter. Since short mode is
47892      # case insensitive, let's make it lowercase to improve readability.
47893      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47894      # Now convert it back to Unix-style (cygpath)
47895      input_path=`$CYGPATH -u "$shortmode_path"`
47896      new_path="$input_path"
47897    fi
47898  fi
47899
47900  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47901  if test "x$test_cygdrive_prefix" = x; then
47902    # As a simple fix, exclude /usr/bin since it's not a real path.
47903    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47904      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47905      # a path prefixed by /cygdrive for fixpath to work.
47906      new_path="$CYGWIN_ROOT_PATH$input_path"
47907    fi
47908  fi
47909
47910
47911  if test "x$path" != "x$new_path"; then
47912    JT_HOME="$new_path"
47913    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47914$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47915  fi
47916
47917    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47918
47919  path="$JT_HOME"
47920  has_colon=`$ECHO $path | $GREP ^.:`
47921  new_path="$path"
47922  if test "x$has_colon" = x; then
47923    # Not in mixed or Windows style, start by that.
47924    new_path=`cmd //c echo $path`
47925  fi
47926
47927
47928  input_path="$new_path"
47929  # Check if we need to convert this using DOS-style short mode. If the path
47930  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47931  # take no chances and rewrite it.
47932  # Note: m4 eats our [], so we need to use [ and ] instead.
47933  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47934  if test "x$has_forbidden_chars" != x; then
47935    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47936    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47937  fi
47938
47939
47940  windows_path="$new_path"
47941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47942    unix_path=`$CYGPATH -u "$windows_path"`
47943    new_path="$unix_path"
47944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47946    new_path="$unix_path"
47947  fi
47948
47949  if test "x$path" != "x$new_path"; then
47950    JT_HOME="$new_path"
47951    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47952$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47953  fi
47954
47955  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47956  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47957
47958    else
47959      # We're on a unix platform. Hooray! :)
47960      path="$JT_HOME"
47961      has_space=`$ECHO "$path" | $GREP " "`
47962      if test "x$has_space" != x; then
47963        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47964$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47965        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47966      fi
47967
47968      # Use eval to expand a potential ~
47969      eval path="$path"
47970      if test ! -f "$path" && test ! -d "$path"; then
47971        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
47972      fi
47973
47974      if test -d "$path"; then
47975        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
47976      else
47977        dir="`$DIRNAME "$path"`"
47978        base="`$BASENAME "$path"`"
47979        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
47980      fi
47981    fi
47982  fi
47983
47984
47985      # jtreg win32 script works for everybody
47986      JTREGEXE="$JT_HOME/bin/jtreg"
47987
47988      if test ! -f "$JTREGEXE"; then
47989        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
47990      fi
47991
47992      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47993$as_echo "$JTREGEXE" >&6; }
47994    else
47995      # try to find jtreg on path
47996
47997
47998
47999  # Publish this variable in the help.
48000
48001
48002  if [ -z "${JTREGEXE+x}" ]; then
48003    # The variable is not set by user, try to locate tool using the code snippet
48004    for ac_prog in jtreg
48005do
48006  # Extract the first word of "$ac_prog", so it can be a program name with args.
48007set dummy $ac_prog; ac_word=$2
48008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48009$as_echo_n "checking for $ac_word... " >&6; }
48010if ${ac_cv_path_JTREGEXE+:} false; then :
48011  $as_echo_n "(cached) " >&6
48012else
48013  case $JTREGEXE in
48014  [\\/]* | ?:[\\/]*)
48015  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48016  ;;
48017  *)
48018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48019for as_dir in $PATH
48020do
48021  IFS=$as_save_IFS
48022  test -z "$as_dir" && as_dir=.
48023    for ac_exec_ext in '' $ac_executable_extensions; do
48024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48025    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48027    break 2
48028  fi
48029done
48030  done
48031IFS=$as_save_IFS
48032
48033  ;;
48034esac
48035fi
48036JTREGEXE=$ac_cv_path_JTREGEXE
48037if test -n "$JTREGEXE"; then
48038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48039$as_echo "$JTREGEXE" >&6; }
48040else
48041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48042$as_echo "no" >&6; }
48043fi
48044
48045
48046  test -n "$JTREGEXE" && break
48047done
48048
48049  else
48050    # The variable is set, but is it from the command line or the environment?
48051
48052    # Try to remove the string !JTREGEXE! from our list.
48053    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48054    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48055      # If it failed, the variable was not from the command line. Ignore it,
48056      # but warn the user (except for BASH, which is always set by the calling BASH).
48057      if test "xJTREGEXE" != xBASH; then
48058        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48059$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48060      fi
48061      # Try to locate tool using the code snippet
48062      for ac_prog in jtreg
48063do
48064  # Extract the first word of "$ac_prog", so it can be a program name with args.
48065set dummy $ac_prog; ac_word=$2
48066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48067$as_echo_n "checking for $ac_word... " >&6; }
48068if ${ac_cv_path_JTREGEXE+:} false; then :
48069  $as_echo_n "(cached) " >&6
48070else
48071  case $JTREGEXE in
48072  [\\/]* | ?:[\\/]*)
48073  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48074  ;;
48075  *)
48076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48077for as_dir in $PATH
48078do
48079  IFS=$as_save_IFS
48080  test -z "$as_dir" && as_dir=.
48081    for ac_exec_ext in '' $ac_executable_extensions; do
48082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48083    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48085    break 2
48086  fi
48087done
48088  done
48089IFS=$as_save_IFS
48090
48091  ;;
48092esac
48093fi
48094JTREGEXE=$ac_cv_path_JTREGEXE
48095if test -n "$JTREGEXE"; then
48096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48097$as_echo "$JTREGEXE" >&6; }
48098else
48099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48100$as_echo "no" >&6; }
48101fi
48102
48103
48104  test -n "$JTREGEXE" && break
48105done
48106
48107    else
48108      # If it succeeded, then it was overridden by the user. We will use it
48109      # for the tool.
48110
48111      # First remove it from the list of overridden variables, so we can test
48112      # for unknown variables in the end.
48113      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48114
48115      # Check if we try to supply an empty value
48116      if test "x$JTREGEXE" = x; then
48117        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48118$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48119        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48120$as_echo_n "checking for JTREGEXE... " >&6; }
48121        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48122$as_echo "disabled" >&6; }
48123      else
48124        # Check if the provided tool contains a complete path.
48125        tool_specified="$JTREGEXE"
48126        tool_basename="${tool_specified##*/}"
48127        if test "x$tool_basename" = "x$tool_specified"; then
48128          # A command without a complete path is provided, search $PATH.
48129          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48130$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48131          # Extract the first word of "$tool_basename", so it can be a program name with args.
48132set dummy $tool_basename; ac_word=$2
48133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48134$as_echo_n "checking for $ac_word... " >&6; }
48135if ${ac_cv_path_JTREGEXE+:} false; then :
48136  $as_echo_n "(cached) " >&6
48137else
48138  case $JTREGEXE in
48139  [\\/]* | ?:[\\/]*)
48140  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48141  ;;
48142  *)
48143  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48144for as_dir in $PATH
48145do
48146  IFS=$as_save_IFS
48147  test -z "$as_dir" && as_dir=.
48148    for ac_exec_ext in '' $ac_executable_extensions; do
48149  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48150    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48152    break 2
48153  fi
48154done
48155  done
48156IFS=$as_save_IFS
48157
48158  ;;
48159esac
48160fi
48161JTREGEXE=$ac_cv_path_JTREGEXE
48162if test -n "$JTREGEXE"; then
48163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48164$as_echo "$JTREGEXE" >&6; }
48165else
48166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48167$as_echo "no" >&6; }
48168fi
48169
48170
48171          if test "x$JTREGEXE" = x; then
48172            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48173          fi
48174        else
48175          # Otherwise we believe it is a complete path. Use it as it is.
48176          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48177$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48178          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48179$as_echo_n "checking for JTREGEXE... " >&6; }
48180          if test ! -x "$tool_specified"; then
48181            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48182$as_echo "not found" >&6; }
48183            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48184          fi
48185          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48186$as_echo "$tool_specified" >&6; }
48187        fi
48188      fi
48189    fi
48190
48191  fi
48192
48193
48194
48195  if test "x$JTREGEXE" = x; then
48196    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48197  fi
48198
48199
48200      JT_HOME="`$DIRNAME $JTREGEXE`"
48201    fi
48202  fi
48203
48204
48205
48206
48207
48208
48209  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48210  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48211  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48212  #                              commands produced by the link step (currently AIX only)
48213  if test "x$TOOLCHAIN_TYPE" = xxlc; then
48214    COMPILER_TARGET_BITS_FLAG="-q"
48215    COMPILER_COMMAND_FILE_FLAG="-f"
48216    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48217  else
48218    COMPILER_TARGET_BITS_FLAG="-m"
48219    COMPILER_COMMAND_FILE_FLAG="@"
48220    COMPILER_BINDCMD_FILE_FLAG=""
48221
48222    # The solstudio linker does not support @-files.
48223    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48224      COMPILER_COMMAND_FILE_FLAG=
48225    fi
48226
48227    # Check if @file is supported by gcc
48228    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48229      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48230$as_echo_n "checking if @file is supported by gcc... " >&6; }
48231      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48232      $ECHO "" "--version" > command.file
48233      if $CXX @command.file 2>&5 >&5; then
48234        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48235$as_echo "yes" >&6; }
48236        COMPILER_COMMAND_FILE_FLAG="@"
48237      else
48238        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48239$as_echo "no" >&6; }
48240        COMPILER_COMMAND_FILE_FLAG=
48241      fi
48242      $RM command.file
48243    fi
48244  fi
48245
48246
48247
48248
48249  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48250  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48251    ARFLAGS="-r"
48252  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48253    ARFLAGS="-X64"
48254  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48255    # lib.exe is used as AR to create static libraries.
48256    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48257  else
48258    ARFLAGS=""
48259  fi
48260
48261
48262  ## Setup strip.
48263  # FIXME: should this really be per platform, or should it be per toolchain type?
48264  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48265  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48266  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48267    STRIPFLAGS="-g"
48268  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48269    STRIPFLAGS="-x"
48270  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48271    STRIPFLAGS="-S"
48272  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48273    STRIPFLAGS="-X32_64"
48274  fi
48275
48276
48277
48278  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48279    CC_OUT_OPTION=-Fo
48280    EXE_OUT_OPTION=-out:
48281    LD_OUT_OPTION=-out:
48282    AR_OUT_OPTION=-out:
48283  else
48284    # The option used to specify the target .o,.a or .so file.
48285    # When compiling, how to specify the to be created object file.
48286    CC_OUT_OPTION='-o$(SPACE)'
48287    # When linking, how to specify the to be created executable.
48288    EXE_OUT_OPTION='-o$(SPACE)'
48289    # When linking, how to specify the to be created dynamically linkable library.
48290    LD_OUT_OPTION='-o$(SPACE)'
48291    # When archiving, how to specify the to be create static archive for object files.
48292    AR_OUT_OPTION='rcs$(SPACE)'
48293  fi
48294
48295
48296
48297
48298
48299  # On Windows, we need to set RC flags.
48300  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48301    RC_FLAGS="-nologo -l0x409"
48302    JVM_RCFLAGS="-nologo"
48303    if test "x$DEBUG_LEVEL" = xrelease; then
48304      RC_FLAGS="$RC_FLAGS -DNDEBUG"
48305      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48306    fi
48307
48308    # The version variables used to create RC_FLAGS may be overridden
48309    # in a custom configure script, or possibly the command line.
48310    # Let those variables be expanded at make time in spec.gmk.
48311    # The \$ are escaped to the shell, and the $(...) variables
48312    # are evaluated by make.
48313    RC_FLAGS="$RC_FLAGS \
48314        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48315        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48316        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48317        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48318        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48319        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48320        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48321
48322    JVM_RCFLAGS="$JVM_RCFLAGS \
48323        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48324        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48325        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
48326        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
48327        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
48328        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
48329        -D\"HS_FNAME=jvm.dll\" \
48330        -D\"HS_INTERNAL_NAME=jvm\""
48331  fi
48332
48333
48334
48335  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48336    # silence copyright notice and other headers.
48337    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
48338  fi
48339
48340
48341# Now we can test some aspects on the target using configure macros.
48342
48343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
48344$as_echo_n "checking for ANSI C header files... " >&6; }
48345if ${ac_cv_header_stdc+:} false; then :
48346  $as_echo_n "(cached) " >&6
48347else
48348  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48349/* end confdefs.h.  */
48350#include <stdlib.h>
48351#include <stdarg.h>
48352#include <string.h>
48353#include <float.h>
48354
48355int
48356main ()
48357{
48358
48359  ;
48360  return 0;
48361}
48362_ACEOF
48363if ac_fn_cxx_try_compile "$LINENO"; then :
48364  ac_cv_header_stdc=yes
48365else
48366  ac_cv_header_stdc=no
48367fi
48368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48369
48370if test $ac_cv_header_stdc = yes; then
48371  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
48372  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48373/* end confdefs.h.  */
48374#include <string.h>
48375
48376_ACEOF
48377if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48378  $EGREP "memchr" >/dev/null 2>&1; then :
48379
48380else
48381  ac_cv_header_stdc=no
48382fi
48383rm -f conftest*
48384
48385fi
48386
48387if test $ac_cv_header_stdc = yes; then
48388  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
48389  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48390/* end confdefs.h.  */
48391#include <stdlib.h>
48392
48393_ACEOF
48394if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48395  $EGREP "free" >/dev/null 2>&1; then :
48396
48397else
48398  ac_cv_header_stdc=no
48399fi
48400rm -f conftest*
48401
48402fi
48403
48404if test $ac_cv_header_stdc = yes; then
48405  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
48406  if test "$cross_compiling" = yes; then :
48407  :
48408else
48409  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48410/* end confdefs.h.  */
48411#include <ctype.h>
48412#include <stdlib.h>
48413#if ((' ' & 0x0FF) == 0x020)
48414# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
48415# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
48416#else
48417# define ISLOWER(c) \
48418		   (('a' <= (c) && (c) <= 'i') \
48419		     || ('j' <= (c) && (c) <= 'r') \
48420		     || ('s' <= (c) && (c) <= 'z'))
48421# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
48422#endif
48423
48424#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
48425int
48426main ()
48427{
48428  int i;
48429  for (i = 0; i < 256; i++)
48430    if (XOR (islower (i), ISLOWER (i))
48431	|| toupper (i) != TOUPPER (i))
48432      return 2;
48433  return 0;
48434}
48435_ACEOF
48436if ac_fn_cxx_try_run "$LINENO"; then :
48437
48438else
48439  ac_cv_header_stdc=no
48440fi
48441rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48442  conftest.$ac_objext conftest.beam conftest.$ac_ext
48443fi
48444
48445fi
48446fi
48447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48448$as_echo "$ac_cv_header_stdc" >&6; }
48449if test $ac_cv_header_stdc = yes; then
48450
48451$as_echo "#define STDC_HEADERS 1" >>confdefs.h
48452
48453fi
48454
48455# On IRIX 5.3, sys/types and inttypes.h are conflicting.
48456for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48457		  inttypes.h stdint.h unistd.h
48458do :
48459  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48460ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48461"
48462if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48463  cat >>confdefs.h <<_ACEOF
48464#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48465_ACEOF
48466
48467fi
48468
48469done
48470
48471
48472
48473  ###############################################################################
48474  #
48475  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48476  # (The JVM can use 32 or 64 bit Java pointers but that decision
48477  # is made at runtime.)
48478  #
48479
48480  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48481    # Always specify -m flag on Solaris
48482    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48483
48484  # When we add flags to the "official" CFLAGS etc, we need to
48485  # keep track of these additions in ADDED_CFLAGS etc. These
48486  # will later be checked to make sure only controlled additions
48487  # have been made to CFLAGS etc.
48488  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48489  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48490  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48491
48492  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48493  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48494  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48495
48496  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48497  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48498  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48499
48500  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48501  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48502  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48503
48504  elif test "x$COMPILE_TYPE" = xreduced; then
48505    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48506      # Specify -m if running reduced on unix platforms
48507
48508  # When we add flags to the "official" CFLAGS etc, we need to
48509  # keep track of these additions in ADDED_CFLAGS etc. These
48510  # will later be checked to make sure only controlled additions
48511  # have been made to CFLAGS etc.
48512  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48513  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48514  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48515
48516  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48517  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48518  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48519
48520  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48521  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48522  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48523
48524  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48525  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48526  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48527
48528    fi
48529  fi
48530  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48531    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48532    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48533    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48534  fi
48535
48536  # Make compilation sanity check
48537  for ac_header in stdio.h
48538do :
48539  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48540if test "x$ac_cv_header_stdio_h" = xyes; then :
48541  cat >>confdefs.h <<_ACEOF
48542#define HAVE_STDIO_H 1
48543_ACEOF
48544
48545else
48546
48547    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48548$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48549    if test "x$COMPILE_TYPE" = xreduced; then
48550
48551  # Print a helpful message on how to acquire the necessary build dependency.
48552  # reduced is the help tag: freetype, cups, alsa etc
48553  MISSING_DEPENDENCY=reduced
48554
48555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48556    cygwin_help $MISSING_DEPENDENCY
48557  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48558    msys_help $MISSING_DEPENDENCY
48559  else
48560    PKGHANDLER_COMMAND=
48561
48562    case $PKGHANDLER in
48563      apt-get)
48564        apt_help     $MISSING_DEPENDENCY ;;
48565      yum)
48566        yum_help     $MISSING_DEPENDENCY ;;
48567      port)
48568        port_help    $MISSING_DEPENDENCY ;;
48569      pkgutil)
48570        pkgutil_help $MISSING_DEPENDENCY ;;
48571      pkgadd)
48572        pkgadd_help  $MISSING_DEPENDENCY ;;
48573    esac
48574
48575    if test "x$PKGHANDLER_COMMAND" != x; then
48576      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48577    fi
48578  fi
48579
48580      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48581$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48582    elif test "x$COMPILE_TYPE" = xcross; then
48583      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48584$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48585    fi
48586    as_fn_error $? "Cannot continue." "$LINENO" 5
48587
48588fi
48589
48590done
48591
48592
48593  # The cast to long int works around a bug in the HP C Compiler
48594# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48595# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48596# This bug is HP SR number 8606223364.
48597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48598$as_echo_n "checking size of int *... " >&6; }
48599if ${ac_cv_sizeof_int_p+:} false; then :
48600  $as_echo_n "(cached) " >&6
48601else
48602  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48603
48604else
48605  if test "$ac_cv_type_int_p" = yes; then
48606     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48607$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48608as_fn_error 77 "cannot compute sizeof (int *)
48609See \`config.log' for more details" "$LINENO" 5; }
48610   else
48611     ac_cv_sizeof_int_p=0
48612   fi
48613fi
48614
48615fi
48616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48617$as_echo "$ac_cv_sizeof_int_p" >&6; }
48618
48619
48620
48621cat >>confdefs.h <<_ACEOF
48622#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48623_ACEOF
48624
48625
48626
48627  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48628  if test "x$ac_cv_sizeof_int_p" = x; then
48629    # The test failed, lets stick to the assumed value.
48630    { $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
48631$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48632  else
48633    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48634
48635    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48636      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48637      # Let's try to implicitely set the compilers target architecture and retry the test
48638      { $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
48639$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;}
48640      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48641$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48642
48643  # When we add flags to the "official" CFLAGS etc, we need to
48644  # keep track of these additions in ADDED_CFLAGS etc. These
48645  # will later be checked to make sure only controlled additions
48646  # have been made to CFLAGS etc.
48647  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48648  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48649  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48650
48651  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48652  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48653  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48654
48655  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48656  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48657  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48658
48659  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48660  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48661  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48662
48663
48664      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48665      unset ac_cv_sizeof_int_p
48666      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48667      cat >>confdefs.h <<_ACEOF
48668#undef SIZEOF_INT_P
48669_ACEOF
48670
48671      # The cast to long int works around a bug in the HP C Compiler
48672# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48673# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48674# This bug is HP SR number 8606223364.
48675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48676$as_echo_n "checking size of int *... " >&6; }
48677if ${ac_cv_sizeof_int_p+:} false; then :
48678  $as_echo_n "(cached) " >&6
48679else
48680  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48681
48682else
48683  if test "$ac_cv_type_int_p" = yes; then
48684     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48685$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48686as_fn_error 77 "cannot compute sizeof (int *)
48687See \`config.log' for more details" "$LINENO" 5; }
48688   else
48689     ac_cv_sizeof_int_p=0
48690   fi
48691fi
48692
48693fi
48694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48695$as_echo "$ac_cv_sizeof_int_p" >&6; }
48696
48697
48698
48699cat >>confdefs.h <<_ACEOF
48700#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48701_ACEOF
48702
48703
48704
48705      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48706
48707      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48708        { $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
48709$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;}
48710        if test "x$COMPILE_TYPE" = xreduced; then
48711
48712  # Print a helpful message on how to acquire the necessary build dependency.
48713  # reduced is the help tag: freetype, cups, alsa etc
48714  MISSING_DEPENDENCY=reduced
48715
48716  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48717    cygwin_help $MISSING_DEPENDENCY
48718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48719    msys_help $MISSING_DEPENDENCY
48720  else
48721    PKGHANDLER_COMMAND=
48722
48723    case $PKGHANDLER in
48724      apt-get)
48725        apt_help     $MISSING_DEPENDENCY ;;
48726      yum)
48727        yum_help     $MISSING_DEPENDENCY ;;
48728      port)
48729        port_help    $MISSING_DEPENDENCY ;;
48730      pkgutil)
48731        pkgutil_help $MISSING_DEPENDENCY ;;
48732      pkgadd)
48733        pkgadd_help  $MISSING_DEPENDENCY ;;
48734    esac
48735
48736    if test "x$PKGHANDLER_COMMAND" != x; then
48737      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48738    fi
48739  fi
48740
48741          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48742$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48743        elif test "x$COMPILE_TYPE" = xcross; then
48744          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48745$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48746        fi
48747        as_fn_error $? "Cannot continue." "$LINENO" 5
48748      fi
48749    fi
48750  fi
48751
48752  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48753$as_echo_n "checking for target address size... " >&6; }
48754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48755$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48756
48757
48758  ###############################################################################
48759  #
48760  # Is the target little of big endian?
48761  #
48762   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48763$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48764if ${ac_cv_c_bigendian+:} false; then :
48765  $as_echo_n "(cached) " >&6
48766else
48767  ac_cv_c_bigendian=unknown
48768    # See if we're dealing with a universal compiler.
48769    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48770/* end confdefs.h.  */
48771#ifndef __APPLE_CC__
48772	       not a universal capable compiler
48773	     #endif
48774	     typedef int dummy;
48775
48776_ACEOF
48777if ac_fn_cxx_try_compile "$LINENO"; then :
48778
48779	# Check for potential -arch flags.  It is not universal unless
48780	# there are at least two -arch flags with different values.
48781	ac_arch=
48782	ac_prev=
48783	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48784	 if test -n "$ac_prev"; then
48785	   case $ac_word in
48786	     i?86 | x86_64 | ppc | ppc64)
48787	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48788		 ac_arch=$ac_word
48789	       else
48790		 ac_cv_c_bigendian=universal
48791		 break
48792	       fi
48793	       ;;
48794	   esac
48795	   ac_prev=
48796	 elif test "x$ac_word" = "x-arch"; then
48797	   ac_prev=arch
48798	 fi
48799       done
48800fi
48801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48802    if test $ac_cv_c_bigendian = unknown; then
48803      # See if sys/param.h defines the BYTE_ORDER macro.
48804      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48805/* end confdefs.h.  */
48806#include <sys/types.h>
48807	     #include <sys/param.h>
48808
48809int
48810main ()
48811{
48812#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48813		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48814		     && LITTLE_ENDIAN)
48815	      bogus endian macros
48816	     #endif
48817
48818  ;
48819  return 0;
48820}
48821_ACEOF
48822if ac_fn_cxx_try_compile "$LINENO"; then :
48823  # It does; now see whether it defined to BIG_ENDIAN or not.
48824	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48825/* end confdefs.h.  */
48826#include <sys/types.h>
48827		#include <sys/param.h>
48828
48829int
48830main ()
48831{
48832#if BYTE_ORDER != BIG_ENDIAN
48833		 not big endian
48834		#endif
48835
48836  ;
48837  return 0;
48838}
48839_ACEOF
48840if ac_fn_cxx_try_compile "$LINENO"; then :
48841  ac_cv_c_bigendian=yes
48842else
48843  ac_cv_c_bigendian=no
48844fi
48845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48846fi
48847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48848    fi
48849    if test $ac_cv_c_bigendian = unknown; then
48850      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48851      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48852/* end confdefs.h.  */
48853#include <limits.h>
48854
48855int
48856main ()
48857{
48858#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48859	      bogus endian macros
48860	     #endif
48861
48862  ;
48863  return 0;
48864}
48865_ACEOF
48866if ac_fn_cxx_try_compile "$LINENO"; then :
48867  # It does; now see whether it defined to _BIG_ENDIAN or not.
48868	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48869/* end confdefs.h.  */
48870#include <limits.h>
48871
48872int
48873main ()
48874{
48875#ifndef _BIG_ENDIAN
48876		 not big endian
48877		#endif
48878
48879  ;
48880  return 0;
48881}
48882_ACEOF
48883if ac_fn_cxx_try_compile "$LINENO"; then :
48884  ac_cv_c_bigendian=yes
48885else
48886  ac_cv_c_bigendian=no
48887fi
48888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48889fi
48890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48891    fi
48892    if test $ac_cv_c_bigendian = unknown; then
48893      # Compile a test program.
48894      if test "$cross_compiling" = yes; then :
48895  # Try to guess by grepping values from an object file.
48896	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48897/* end confdefs.h.  */
48898short int ascii_mm[] =
48899		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48900		short int ascii_ii[] =
48901		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48902		int use_ascii (int i) {
48903		  return ascii_mm[i] + ascii_ii[i];
48904		}
48905		short int ebcdic_ii[] =
48906		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48907		short int ebcdic_mm[] =
48908		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48909		int use_ebcdic (int i) {
48910		  return ebcdic_mm[i] + ebcdic_ii[i];
48911		}
48912		extern int foo;
48913
48914int
48915main ()
48916{
48917return use_ascii (foo) == use_ebcdic (foo);
48918  ;
48919  return 0;
48920}
48921_ACEOF
48922if ac_fn_cxx_try_compile "$LINENO"; then :
48923  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48924	      ac_cv_c_bigendian=yes
48925	    fi
48926	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48927	      if test "$ac_cv_c_bigendian" = unknown; then
48928		ac_cv_c_bigendian=no
48929	      else
48930		# finding both strings is unlikely to happen, but who knows?
48931		ac_cv_c_bigendian=unknown
48932	      fi
48933	    fi
48934fi
48935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48936else
48937  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48938/* end confdefs.h.  */
48939$ac_includes_default
48940int
48941main ()
48942{
48943
48944	     /* Are we little or big endian?  From Harbison&Steele.  */
48945	     union
48946	     {
48947	       long int l;
48948	       char c[sizeof (long int)];
48949	     } u;
48950	     u.l = 1;
48951	     return u.c[sizeof (long int) - 1] == 1;
48952
48953  ;
48954  return 0;
48955}
48956_ACEOF
48957if ac_fn_cxx_try_run "$LINENO"; then :
48958  ac_cv_c_bigendian=no
48959else
48960  ac_cv_c_bigendian=yes
48961fi
48962rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48963  conftest.$ac_objext conftest.beam conftest.$ac_ext
48964fi
48965
48966    fi
48967fi
48968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
48969$as_echo "$ac_cv_c_bigendian" >&6; }
48970 case $ac_cv_c_bigendian in #(
48971   yes)
48972     ENDIAN="big";; #(
48973   no)
48974     ENDIAN="little" ;; #(
48975   universal)
48976     ENDIAN="universal_endianness"
48977     ;; #(
48978   *)
48979     ENDIAN="unknown" ;;
48980 esac
48981
48982
48983  if test "x$ENDIAN" = xuniversal_endianness; then
48984    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
48985  fi
48986  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
48987    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
48988  fi
48989
48990
48991# Configure flags for the tools
48992
48993  ###############################################################################
48994  #
48995  # How to compile shared libraries.
48996  #
48997
48998  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48999    PICFLAG="-fPIC"
49000    C_FLAG_REORDER=''
49001    CXX_FLAG_REORDER=''
49002
49003    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49004      # Linking is different on MacOSX
49005      if test "x$STATIC_BUILD" = xtrue; then
49006        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49007      else
49008        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49009        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49010      fi
49011      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49012      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49013      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49014      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49015    else
49016      # Default works for linux, might work on other platforms as well.
49017      SHARED_LIBRARY_FLAGS='-shared'
49018      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49019      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49020      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49021      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49022    fi
49023  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49024    C_FLAG_REORDER=''
49025    CXX_FLAG_REORDER=''
49026
49027    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49028      # Linking is different on MacOSX
49029      PICFLAG=''
49030      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49031      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49032      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49033      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49034      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49035
49036      if test "x$STATIC_BUILD" = xfalse; then
49037        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49038      fi
49039    else
49040      # Default works for linux, might work on other platforms as well.
49041      PICFLAG='-fPIC'
49042      SHARED_LIBRARY_FLAGS='-shared'
49043      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49044      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49045      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49046      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49047    fi
49048  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49049    if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
49050      PICFLAG="-xcode=pic32"
49051    else
49052      PICFLAG="-KPIC"
49053    fi
49054    C_FLAG_REORDER='-xF'
49055    CXX_FLAG_REORDER='-xF'
49056    SHARED_LIBRARY_FLAGS="-G"
49057    SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
49058    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49059    SET_SHARED_LIBRARY_NAME='-h $1'
49060    SET_SHARED_LIBRARY_MAPFILE='-M$1'
49061  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49062    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49063    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49064    # will have to patch this single instruction with a call to some out-of-order code which
49065    # does the load from the TOC. This is of course slow. But in that case we also would have
49066    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49067    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49068    # can be patched directly by the linker and does not require a jump to out-of-order code.
49069    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49070    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49071    # loads for accessing a global variable). But there are rumors that this may be seen as a
49072    # 'performance feature' because of improved code locality of the symbols used in a
49073    # compilation unit.
49074    PICFLAG="-qpic"
49075    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49076    C_FLAG_REORDER=''
49077    CXX_FLAG_REORDER=''
49078    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49079    SET_EXECUTABLE_ORIGIN=""
49080    SET_SHARED_LIBRARY_ORIGIN=''
49081    SET_SHARED_LIBRARY_NAME=''
49082    SET_SHARED_LIBRARY_MAPFILE=''
49083  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49084    PICFLAG=""
49085    C_FLAG_REORDER=''
49086    CXX_FLAG_REORDER=''
49087    SHARED_LIBRARY_FLAGS="-dll"
49088    SET_EXECUTABLE_ORIGIN=''
49089    SET_SHARED_LIBRARY_ORIGIN=''
49090    SET_SHARED_LIBRARY_NAME=''
49091    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49092  fi
49093
49094
49095
49096
49097
49098
49099
49100
49101
49102  # The (cross) compiler is now configured, we can now test capabilities
49103  # of the target platform.
49104
49105
49106
49107  ###############################################################################
49108  #
49109  # Setup the opt flags for different compilers
49110  # and different operating systems.
49111  #
49112
49113  # FIXME: this was indirectly the old default, but just inherited.
49114  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49115  #   C_FLAG_DEPS="-MMD -MF"
49116  # fi
49117
49118  # Generate make dependency files
49119  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49120    C_FLAG_DEPS="-MMD -MF"
49121  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49122    C_FLAG_DEPS="-MMD -MF"
49123  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49124    C_FLAG_DEPS="-xMMD -xMF"
49125  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49126    C_FLAG_DEPS="-qmakedep=gcc -MF"
49127  fi
49128  CXX_FLAG_DEPS="$C_FLAG_DEPS"
49129
49130
49131
49132  # Debug symbols
49133  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49134    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49135      # reduce from default "-g2" option to save space
49136      CFLAGS_DEBUG_SYMBOLS="-g1"
49137      CXXFLAGS_DEBUG_SYMBOLS="-g1"
49138    else
49139      CFLAGS_DEBUG_SYMBOLS="-g"
49140      CXXFLAGS_DEBUG_SYMBOLS="-g"
49141    fi
49142  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49143    CFLAGS_DEBUG_SYMBOLS="-g"
49144    CXXFLAGS_DEBUG_SYMBOLS="-g"
49145  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49146    CFLAGS_DEBUG_SYMBOLS="-g -xs"
49147    # -g0 enables debug symbols without disabling inlining.
49148    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49149  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49150    CFLAGS_DEBUG_SYMBOLS="-g"
49151    CXXFLAGS_DEBUG_SYMBOLS="-g"
49152  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49153    CFLAGS_DEBUG_SYMBOLS="-Zi"
49154    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49155  fi
49156
49157
49158
49159  # Debug symbols for JVM_CFLAGS
49160  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49161    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49162    if test "x$DEBUG_LEVEL" = xslowdebug; then
49163      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49164    else
49165      # -g0 does not disable inlining, which -g does.
49166      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49167    fi
49168  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49169    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49170  else
49171    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49172  fi
49173
49174
49175  # bounds, memory and behavior checking options
49176  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49177    case $DEBUG_LEVEL in
49178    release )
49179      # no adjustment
49180      ;;
49181    fastdebug )
49182      # no adjustment
49183      ;;
49184    slowdebug )
49185      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49186      # get's added conditionally on whether we produce debug symbols or not.
49187      # This is most likely not really correct.
49188
49189      # Add runtime stack smashing and undefined behavior checks.
49190      # Not all versions of gcc support -fstack-protector
49191      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
49192
49193
49194
49195
49196
49197
49198
49199
49200
49201
49202
49203
49204
49205
49206
49207
49208
49209
49210
49211
49212
49213
49214
49215
49216
49217
49218
49219
49220
49221
49222
49223
49224
49225
49226
49227
49228
49229
49230
49231
49232
49233
49234    # Execute function body
49235
49236
49237
49238
49239
49240
49241
49242
49243
49244
49245
49246
49247
49248
49249
49250
49251
49252
49253
49254
49255
49256
49257
49258
49259
49260
49261
49262
49263
49264
49265
49266
49267
49268
49269
49270
49271
49272
49273
49274
49275
49276
49277
49278
49279
49280
49281
49282
49283    # Execute function body
49284
49285  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49286$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49287  supports=yes
49288
49289  saved_cflags="$CFLAGS"
49290  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49291  ac_ext=c
49292ac_cpp='$CPP $CPPFLAGS'
49293ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49294ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49295ac_compiler_gnu=$ac_cv_c_compiler_gnu
49296
49297  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49298/* end confdefs.h.  */
49299int i;
49300_ACEOF
49301if ac_fn_c_try_compile "$LINENO"; then :
49302
49303else
49304  supports=no
49305fi
49306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49307  ac_ext=cpp
49308ac_cpp='$CXXCPP $CPPFLAGS'
49309ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49310ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49311ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49312
49313  CFLAGS="$saved_cflags"
49314
49315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49316$as_echo "$supports" >&6; }
49317  if test "x$supports" = "xyes" ; then
49318    :
49319    C_COMP_SUPPORTS="yes"
49320  else
49321    :
49322    C_COMP_SUPPORTS="no"
49323  fi
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
49354
49355
49356
49357
49358
49359
49360
49361
49362
49363
49364
49365
49366
49367
49368
49369
49370
49371
49372
49373
49374
49375
49376
49377
49378
49379
49380
49381
49382
49383    # Execute function body
49384
49385  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49386$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49387  supports=yes
49388
49389  saved_cxxflags="$CXXFLAGS"
49390  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
49391  ac_ext=cpp
49392ac_cpp='$CXXCPP $CPPFLAGS'
49393ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49394ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49395ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49396
49397  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49398/* end confdefs.h.  */
49399int i;
49400_ACEOF
49401if ac_fn_cxx_try_compile "$LINENO"; then :
49402
49403else
49404  supports=no
49405fi
49406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49407  ac_ext=cpp
49408ac_cpp='$CXXCPP $CPPFLAGS'
49409ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49410ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49411ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49412
49413  CXXFLAGS="$saved_cxxflags"
49414
49415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49416$as_echo "$supports" >&6; }
49417  if test "x$supports" = "xyes" ; then
49418    :
49419    CXX_COMP_SUPPORTS="yes"
49420  else
49421    :
49422    CXX_COMP_SUPPORTS="no"
49423  fi
49424
49425
49426
49427
49428
49429
49430
49431
49432
49433
49434
49435
49436
49437  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49438$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49439  supports=no
49440  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49441
49442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49443$as_echo "$supports" >&6; }
49444  if test "x$supports" = "xyes" ; then
49445    :
49446
49447  else
49448    :
49449    STACK_PROTECTOR_CFLAG=""
49450  fi
49451
49452
49453
49454
49455
49456
49457
49458      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49459      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49460      if test "x$STACK_PROTECTOR_CFLAG" != x; then
49461        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49462      fi
49463      ;;
49464    esac
49465  fi
49466
49467  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49468    if test "x$DEBUG_LEVEL" != xrelease; then
49469      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49470        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49471      fi
49472    fi
49473  fi
49474
49475  # Optimization levels
49476  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49477    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49478
49479    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49480      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49481      C_O_FLAG_HIGHEST_JVM="-xO4"
49482      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49483      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49484      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49485      C_O_FLAG_DEBUG="-xregs=no%frameptr"
49486      C_O_FLAG_DEBUG_JVM=""
49487      C_O_FLAG_NONE="-xregs=no%frameptr"
49488      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49489      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49490      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49491      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49492      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49493      CXX_O_FLAG_DEBUG_JVM=""
49494      CXX_O_FLAG_NONE="-xregs=no%frameptr"
49495      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49496        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49497        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49498      fi
49499    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49500      C_O_FLAG_HIGHEST_JVM="-xO4"
49501      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49502      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49503      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49504      C_O_FLAG_DEBUG=""
49505      C_O_FLAG_DEBUG_JVM=""
49506      C_O_FLAG_NONE=""
49507      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49508      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49509      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49510      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49511      CXX_O_FLAG_DEBUG=""
49512      CXX_O_FLAG_DEBUG_JVM=""
49513      CXX_O_FLAG_NONE=""
49514    fi
49515  else
49516    # The remaining toolchains share opt flags between CC and CXX;
49517    # setup for C and duplicate afterwards.
49518    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49519      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49520        # On MacOSX we optimize for size, something
49521        # we should do for all platforms?
49522        C_O_FLAG_HIGHEST_JVM="-Os"
49523        C_O_FLAG_HIGHEST="-Os"
49524        C_O_FLAG_HI="-Os"
49525        C_O_FLAG_NORM="-Os"
49526        C_O_FLAG_SIZE="-Os"
49527      else
49528        C_O_FLAG_HIGHEST_JVM="-O3"
49529        C_O_FLAG_HIGHEST="-O3"
49530        C_O_FLAG_HI="-O3"
49531        C_O_FLAG_NORM="-O2"
49532        C_O_FLAG_SIZE="-Os"
49533      fi
49534      C_O_FLAG_DEBUG="-O0"
49535      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49536        C_O_FLAG_DEBUG_JVM=""
49537      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49538        C_O_FLAG_DEBUG_JVM="-O0"
49539      fi
49540      C_O_FLAG_NONE="-O0"
49541    elif test "x$TOOLCHAIN_TYPE" = xclang; then
49542      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49543        # On MacOSX we optimize for size, something
49544        # we should do for all platforms?
49545        C_O_FLAG_HIGHEST_JVM="-Os"
49546        C_O_FLAG_HIGHEST="-Os"
49547        C_O_FLAG_HI="-Os"
49548        C_O_FLAG_NORM="-Os"
49549        C_O_FLAG_SIZE="-Os"
49550      else
49551        C_O_FLAG_HIGHEST_JVM="-O3"
49552        C_O_FLAG_HIGHEST="-O3"
49553        C_O_FLAG_HI="-O3"
49554        C_O_FLAG_NORM="-O2"
49555        C_O_FLAG_SIZE="-Os"
49556      fi
49557      C_O_FLAG_DEBUG="-O0"
49558      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49559        C_O_FLAG_DEBUG_JVM=""
49560      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49561        C_O_FLAG_DEBUG_JVM="-O0"
49562      fi
49563      C_O_FLAG_NONE="-O0"
49564    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49565      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
49566      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
49567      C_O_FLAG_HI="-O3 -qinline -qinlglue"
49568      C_O_FLAG_NORM="-O2"
49569      C_O_FLAG_DEBUG="-qnoopt"
49570      # FIXME: Value below not verified.
49571      C_O_FLAG_DEBUG_JVM=""
49572      C_O_FLAG_NONE="-qnoopt"
49573    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49574      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49575      C_O_FLAG_HIGHEST="-O2"
49576      C_O_FLAG_HI="-O1"
49577      C_O_FLAG_NORM="-O1"
49578      C_O_FLAG_DEBUG="-Od"
49579      C_O_FLAG_DEBUG_JVM=""
49580      C_O_FLAG_NONE="-Od"
49581      C_O_FLAG_SIZE="-Os"
49582    fi
49583    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49584    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49585    CXX_O_FLAG_HI="$C_O_FLAG_HI"
49586    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49587    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49588    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49589    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49590    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49591  fi
49592
49593  # Adjust optimization flags according to debug level.
49594  case $DEBUG_LEVEL in
49595    release )
49596      # no adjustment
49597      ;;
49598    fastdebug )
49599      # Not quite so much optimization
49600      C_O_FLAG_HI="$C_O_FLAG_NORM"
49601      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49602      ;;
49603    slowdebug )
49604      # Disable optimization
49605      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49606      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49607      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49608      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49609      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49610      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49611      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49612      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49613      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49614      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49615      ;;
49616  esac
49617
49618
49619
49620
49621
49622
49623
49624
49625
49626
49627
49628
49629
49630
49631
49632
49633
49634
49635
49636  # Special extras...
49637  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49638    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49639      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49640      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49641    fi
49642    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49643    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49644  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49645    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49646    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49647  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49648    CXXSTD_CXXFLAG="-std=gnu++98"
49649
49650
49651
49652
49653
49654
49655
49656
49657
49658
49659
49660
49661
49662
49663
49664
49665
49666
49667
49668
49669
49670
49671
49672
49673
49674
49675
49676
49677
49678
49679
49680
49681
49682
49683
49684
49685
49686
49687
49688
49689
49690
49691    # Execute function body
49692
49693  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
49694$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
49695  supports=yes
49696
49697  saved_cxxflags="$CXXFLAGS"
49698  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
49699  ac_ext=cpp
49700ac_cpp='$CXXCPP $CPPFLAGS'
49701ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49702ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49703ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49704
49705  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49706/* end confdefs.h.  */
49707int i;
49708_ACEOF
49709if ac_fn_cxx_try_compile "$LINENO"; then :
49710
49711else
49712  supports=no
49713fi
49714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49715  ac_ext=cpp
49716ac_cpp='$CXXCPP $CPPFLAGS'
49717ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49718ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49719ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49720
49721  CXXFLAGS="$saved_cxxflags"
49722
49723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49724$as_echo "$supports" >&6; }
49725  if test "x$supports" = "xyes" ; then
49726    :
49727
49728  else
49729    :
49730    CXXSTD_CXXFLAG=""
49731  fi
49732
49733
49734
49735
49736
49737
49738
49739
49740
49741
49742
49743
49744    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49745    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
49746
49747  fi
49748  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49749    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49750    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49751  fi
49752
49753  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49754    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49755    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49756  fi
49757
49758  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49759  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49760  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49761
49762  ###############################################################################
49763  #
49764  # Now setup the CFLAGS and LDFLAGS for the JDK build.
49765  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49766  #
49767
49768  # Setup compiler/platform specific flags into
49769  #    CFLAGS_JDK    - C Compiler flags
49770  #    CXXFLAGS_JDK  - C++ Compiler flags
49771  #    COMMON_CCXXFLAGS_JDK - common to C and C++
49772  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49773    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49774    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49775    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49776    if test "x$OPENJDK_TARGET_CPU" = xx86; then
49777      # Force compatibility with i586 on 32 bit intel platforms.
49778      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49779      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49780    fi
49781    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49782        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49783    case $OPENJDK_TARGET_CPU_ARCH in
49784      arm )
49785        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49786        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49787        ;;
49788      ppc )
49789        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49790        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49791        ;;
49792      s390 )
49793        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
49794        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49795        ;;
49796      * )
49797        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49798        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49799        ;;
49800    esac
49801
49802
49803
49804
49805
49806
49807
49808
49809
49810
49811
49812
49813
49814
49815
49816
49817
49818
49819
49820
49821
49822
49823
49824
49825
49826
49827
49828
49829
49830
49831
49832
49833
49834
49835
49836
49837
49838
49839
49840
49841
49842
49843
49844
49845
49846
49847
49848
49849
49850
49851
49852
49853
49854
49855    # Execute function body
49856
49857  # Need to assign to a variable since m4 is blocked from modifying parts in [].
49858  REFERENCE_VERSION=6
49859
49860  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
49861    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
49862  fi
49863
49864  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49865    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
49866  fi
49867
49868  # Version comparison method inspired by http://stackoverflow.com/a/24067243
49869  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
49870
49871  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49872    :
49873
49874  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
49875  # runs afoul of the more aggressive versions of these optimisations.
49876  # Notably, value range propagation now assumes that the this pointer of C++
49877  # member functions is non-null.
49878  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
49879        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
49880        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
49881$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
49882  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49883  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49884
49885  else
49886    :
49887
49888  fi
49889
49890
49891
49892
49893
49894
49895
49896
49897
49898
49899
49900
49901
49902
49903  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49904    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49905
49906    # Restrict the debug information created by Clang to avoid
49907    # too big object files and speed the build up a little bit
49908    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
49909    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
49910    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49911      if test "x$OPENJDK_TARGET_CPU" = xx86; then
49912        # Force compatibility with i586 on 32 bit intel platforms.
49913        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49914        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49915      fi
49916      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
49917      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49918          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49919      case $OPENJDK_TARGET_CPU_ARCH in
49920        ppc )
49921          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49922          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49923          ;;
49924        * )
49925          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49926          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49927          ;;
49928      esac
49929    fi
49930  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49931    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
49932    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
49933    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
49934      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
49935    fi
49936
49937    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
49938    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
49939  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49940    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
49941    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49942    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49943  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49944    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
49945        -MD -Zc:wchar_t- -W3 -wd4800 \
49946        -DWIN32_LEAN_AND_MEAN \
49947        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
49948        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
49949        -DWIN32 -DIAL"
49950    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49951      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
49952    else
49953      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
49954    fi
49955    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
49956    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
49957    # studio.
49958    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
49959      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
49960      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
49961      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
49962    fi
49963  fi
49964
49965  ###############################################################################
49966
49967  # Adjust flags according to debug level.
49968  case $DEBUG_LEVEL in
49969    fastdebug | slowdebug )
49970      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
49971      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
49972      ;;
49973    release )
49974      ;;
49975    * )
49976      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
49977      ;;
49978  esac
49979
49980  # Set some common defines. These works for all compilers, but assume
49981  # -D is universally accepted.
49982
49983  # Setup endianness
49984  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
49985    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
49986    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
49987    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
49988    #   Note: -Dmacro         is the same as    #define macro 1
49989    #         -Dmacro=        is the same as    #define macro
49990    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49991      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
49992    else
49993      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
49994    fi
49995  else
49996    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
49997    # are defined in the system?
49998    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49999      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50000    else
50001      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50002    fi
50003  fi
50004
50005  # Setup target OS define. Use OS target name but in upper case.
50006  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50007  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50008
50009  # Setup target CPU
50010  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50011      $OPENJDK_TARGET_ADD_LP64 \
50012      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50013
50014  # Setup debug/release defines
50015  if test "x$DEBUG_LEVEL" = xrelease; then
50016    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50017    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50018      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50019    fi
50020  else
50021    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50022  fi
50023
50024  # Set some additional per-OS defines.
50025  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50026    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50027    JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
50028        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50029  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50030    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50031    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50032        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
50033  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50034    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50035    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50036    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50037    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50038        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50039        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50040        -fno-omit-frame-pointer"
50041  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50042    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50043    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50044    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50045        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50046        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50047  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50048    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50049  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50050    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50051    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50052  fi
50053
50054  # Set some additional per-CPU defines.
50055  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50056    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50057  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50058    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50059  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50060    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50061      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50062      # fixes `relocation truncated to fit' error for gcc 4.1.
50063      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50064      # Use ppc64 instructions, but schedule for power5
50065      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50066    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50067      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50068    fi
50069  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50070    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50071      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50072      # Little endian machine uses ELFv2 ABI.
50073      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50074      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50075      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
50076    fi
50077  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
50078    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50079      JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
50080    fi
50081  fi
50082
50083  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50084    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50085  fi
50086
50087  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50088    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50089      # Solaris does not have _LP64=1 in the old build.
50090      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50091      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50092    fi
50093  fi
50094
50095  # Set JVM_CFLAGS warning handling
50096  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50097    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50098        -Wunused-value -Woverloaded-virtual"
50099
50100    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50101
50102
50103
50104
50105
50106
50107
50108
50109
50110
50111
50112
50113
50114
50115
50116
50117
50118
50119
50120
50121
50122
50123
50124
50125
50126
50127
50128
50129
50130
50131
50132
50133
50134
50135
50136
50137
50138
50139
50140
50141
50142
50143
50144
50145
50146
50147
50148
50149
50150
50151
50152
50153
50154
50155    # Execute function body
50156
50157  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50158  REFERENCE_VERSION=4.8
50159
50160  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50161    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50162  fi
50163
50164  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50165    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50166  fi
50167
50168  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50169  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50170
50171  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50172    :
50173
50174            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50175            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50176
50177
50178  else
50179    :
50180
50181  fi
50182
50183
50184
50185
50186
50187
50188
50189
50190
50191
50192
50193
50194
50195
50196    fi
50197    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50198      # Non-zero builds have stricter warnings
50199      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50200    else
50201      if test "x$TOOLCHAIN_TYPE" = xclang; then
50202        # Some versions of llvm do not like -Wundef
50203        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50204      fi
50205    fi
50206  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50207    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50208        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50209  fi
50210
50211  # Additional macosx handling
50212  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50213    # Setting these parameters makes it an error to link to macosx APIs that are
50214    # newer than the given OS version and makes the linked binaries compatible
50215    # even if built on a newer version of the OS.
50216    # The expected format is X.Y.Z
50217    MACOSX_VERSION_MIN=10.7.0
50218
50219
50220    # The macro takes the version with no dots, ex: 1070
50221    # Let the flags variables get resolved in make for easier override on make
50222    # command line.
50223    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50224    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50225  fi
50226
50227  # Setup some hard coded includes
50228  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50229      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
50230      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50231      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50232      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50233      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50234      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50235
50236  # The shared libraries are compiled using the picflag.
50237  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50238      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50239  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50240      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50241
50242  # Executable flags
50243  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50244  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50245
50246
50247
50248
50249
50250
50251  # Setup LDFLAGS et al.
50252  #
50253
50254  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50255    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50256    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50257    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50258    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50259      LDFLAGS_SAFESH="-safeseh"
50260      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50261      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50262      # NOTE: Old build added -machine. Probably not needed.
50263      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50264    else
50265      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50266    fi
50267  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50268      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50269      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50270        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50271        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50272    fi
50273  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50274    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50275    # We have previously set HAS_GNU_HASH if this is the case
50276    if test -n "$HAS_GNU_HASH"; then
50277      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50278      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50279      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50280    fi
50281      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50282        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50283    fi
50284    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50285      # And since we now know that the linker is gnu, then add -z defs, to forbid
50286      # undefined symbols in object files.
50287      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50288      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50289      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50290      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50291      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50292      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50293        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50294      fi
50295      case $DEBUG_LEVEL in
50296        release )
50297          # tell linker to optimize libraries.
50298          # Should this be supplied to the OSS linker as well?
50299          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50300          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50301          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50302          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50303            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50304          fi
50305          ;;
50306        slowdebug )
50307          # Hotspot always let the linker optimize
50308          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50309          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50310            # do relocations at load
50311            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50312            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50313            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50314          fi
50315          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50316            # mark relocations read only
50317            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50318            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50319            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50320          fi
50321          ;;
50322        fastdebug )
50323          # Hotspot always let the linker optimize
50324          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50325          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50326            # mark relocations read only
50327            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50328            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50329            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50330          fi
50331          ;;
50332        * )
50333          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50334          ;;
50335        esac
50336    fi
50337  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50338    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50339    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
50340    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50341    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50342    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50343    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50344      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50345    fi
50346  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50347    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50348    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50349    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50350  fi
50351
50352  # Customize LDFLAGS for executables
50353
50354  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50355
50356  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50357    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50358      LDFLAGS_STACK_SIZE=1048576
50359    else
50360      LDFLAGS_STACK_SIZE=327680
50361    fi
50362    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50363  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50364    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50365  fi
50366
50367  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50368
50369  # Customize LDFLAGS for libs
50370  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50371
50372  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50373  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50374    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50375        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50376    JDKLIB_LIBS=""
50377  else
50378    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50379        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
50380
50381    if test "xTARGET" = "xTARGET"; then
50382    # On some platforms (mac) the linker warns about non existing -L dirs.
50383    # Add server first if available. Linking aginst client does not always produce the same results.
50384      # Only add client/minimal dir if client/minimal is being built.
50385    # Default to server for other variants.
50386      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
50387        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50388      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
50389        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/client"
50390      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50391        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/minimal"
50392    else
50393        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50394    fi
50395    elif test "xTARGET" = "xBUILD"; then
50396      # When building a buildjdk, it's always only the server variant
50397      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50398          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50399    fi
50400
50401    JDKLIB_LIBS="-ljava -ljvm"
50402    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50403      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50404    fi
50405
50406  fi
50407
50408LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
50409
50410  # Set JVM_LIBS (per os)
50411  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50412    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50413  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50414    # FIXME: This hard-coded path is not really proper.
50415    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50416      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50417    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50418      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50419    fi
50420    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50421        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50422  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50423    JVM_LIBS="$JVM_LIBS -lm"
50424  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50425    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50426  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50427    JVM_LIBS="$JVM_LIBS -lm"
50428  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50429    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50430        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50431        wsock32.lib winmm.lib version.lib psapi.lib"
50432    fi
50433
50434  # Set JVM_ASFLAGS
50435  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50436    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50437      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50438    fi
50439  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50440    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50441  fi
50442
50443  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50444
50445
50446
50447
50448
50449
50450
50451
50452
50453
50454
50455
50456
50457
50458
50459  # Special extras...
50460  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50461    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50462      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50463      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50464    fi
50465    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50466    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50467  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50468    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50469    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50470  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50471    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
50472
50473
50474
50475
50476
50477
50478
50479
50480
50481
50482
50483
50484
50485
50486
50487
50488
50489
50490
50491
50492
50493
50494
50495
50496
50497
50498
50499
50500
50501
50502
50503
50504
50505
50506
50507
50508
50509
50510
50511
50512
50513
50514    # Execute function body
50515
50516  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50517$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50518  supports=yes
50519
50520  saved_cxxflags="$CXXFLAGS"
50521  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50522  ac_ext=cpp
50523ac_cpp='$CXXCPP $CPPFLAGS'
50524ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50525ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50526ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50527
50528  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50529/* end confdefs.h.  */
50530int i;
50531_ACEOF
50532if ac_fn_cxx_try_compile "$LINENO"; then :
50533
50534else
50535  supports=no
50536fi
50537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50538  ac_ext=cpp
50539ac_cpp='$CXXCPP $CPPFLAGS'
50540ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50541ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50542ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50543
50544  CXXFLAGS="$saved_cxxflags"
50545
50546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50547$as_echo "$supports" >&6; }
50548  if test "x$supports" = "xyes" ; then
50549    :
50550
50551  else
50552    :
50553    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50554  fi
50555
50556
50557
50558
50559
50560
50561
50562
50563
50564
50565
50566
50567    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50568    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50569
50570  fi
50571  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50572    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50573    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50574  fi
50575
50576  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50577    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50578    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50579  fi
50580
50581  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50582  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50583  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50584
50585  ###############################################################################
50586  #
50587  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50588  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50589  #
50590
50591  # Setup compiler/platform specific flags into
50592  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50593  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50594  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50595  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50596    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50597    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50598    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50599    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50600      # Force compatibility with i586 on 32 bit intel platforms.
50601      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50602      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50603    fi
50604    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50605        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50606    case $OPENJDK_BUILD_CPU_ARCH in
50607      arm )
50608        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50609        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50610        ;;
50611      ppc )
50612        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50613        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50614        ;;
50615      s390 )
50616        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
50617        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50618        ;;
50619      * )
50620        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50621        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50622        ;;
50623    esac
50624
50625
50626
50627
50628
50629
50630
50631
50632
50633
50634
50635
50636
50637
50638
50639
50640
50641
50642
50643
50644
50645
50646
50647
50648
50649
50650
50651
50652
50653
50654
50655
50656
50657
50658
50659
50660
50661
50662
50663
50664
50665
50666
50667
50668
50669
50670
50671
50672
50673
50674
50675
50676
50677
50678    # Execute function body
50679
50680  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50681  REFERENCE_VERSION=6
50682
50683  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50684    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50685  fi
50686
50687  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50688    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50689  fi
50690
50691  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50692  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50693
50694  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50695    :
50696
50697  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50698  # runs afoul of the more aggressive versions of these optimisations.
50699  # Notably, value range propagation now assumes that the this pointer of C++
50700  # member functions is non-null.
50701  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50702        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50703        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50704$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50705  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50706  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50707
50708  else
50709    :
50710
50711  fi
50712
50713
50714
50715
50716
50717
50718
50719
50720
50721
50722
50723
50724
50725
50726  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50727    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50728
50729    # Restrict the debug information created by Clang to avoid
50730    # too big object files and speed the build up a little bit
50731    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50732    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50733    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50734      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50735        # Force compatibility with i586 on 32 bit intel platforms.
50736        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50737        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50738      fi
50739      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50740      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50741          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50742      case $OPENJDK_BUILD_CPU_ARCH in
50743        ppc )
50744          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50745          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50746          ;;
50747        * )
50748          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50749          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50750          ;;
50751      esac
50752    fi
50753  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50754    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50755    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50756    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50757      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50758    fi
50759
50760    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50761    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50762  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50763    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50764    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50765    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50766  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50767    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50768        -MD -Zc:wchar_t- -W3 -wd4800 \
50769        -DWIN32_LEAN_AND_MEAN \
50770        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50771        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50772        -DWIN32 -DIAL"
50773    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50774      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50775    else
50776      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50777    fi
50778    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50779    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50780    # studio.
50781    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50782      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50783      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50784      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50785    fi
50786  fi
50787
50788  ###############################################################################
50789
50790  # Adjust flags according to debug level.
50791  case $DEBUG_LEVEL in
50792    fastdebug | slowdebug )
50793      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50794      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50795      ;;
50796    release )
50797      ;;
50798    * )
50799      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50800      ;;
50801  esac
50802
50803  # Set some common defines. These works for all compilers, but assume
50804  # -D is universally accepted.
50805
50806  # Setup endianness
50807  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50808    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50809    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50810    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50811    #   Note: -Dmacro         is the same as    #define macro 1
50812    #         -Dmacro=        is the same as    #define macro
50813    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50814      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50815    else
50816      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50817    fi
50818  else
50819    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50820    # are defined in the system?
50821    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50822      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50823    else
50824      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50825    fi
50826  fi
50827
50828  # Setup target OS define. Use OS target name but in upper case.
50829  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50830  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
50831
50832  # Setup target CPU
50833  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50834      $OPENJDK_BUILD_ADD_LP64 \
50835      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
50836
50837  # Setup debug/release defines
50838  if test "x$DEBUG_LEVEL" = xrelease; then
50839    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
50840    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50841      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
50842    fi
50843  else
50844    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
50845  fi
50846
50847  # Set some additional per-OS defines.
50848  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50849    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
50850    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
50851        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50852  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50853    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
50854    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
50855        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
50856  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50857    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50858    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
50859    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50860    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50861        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50862        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50863        -fno-omit-frame-pointer"
50864  elif test "x$OPENJDK_BUILD_OS" = xaix; then
50865    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
50866    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50867    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
50868        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50869        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50870  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50871    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50872  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50873    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50874    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
50875  fi
50876
50877  # Set some additional per-CPU defines.
50878  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
50879    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
50880  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50881    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
50882  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
50883    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50884      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50885      # fixes `relocation truncated to fit' error for gcc 4.1.
50886      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
50887      # Use ppc64 instructions, but schedule for power5
50888      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50889    elif test "x$OPENJDK_BUILD_OS" = xaix; then
50890      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
50891    fi
50892  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
50893    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50894      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50895      # Little endian machine uses ELFv2 ABI.
50896      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
50897      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50898      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
50899    fi
50900  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
50901    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50902      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
50903    fi
50904  fi
50905
50906  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50907    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50908  fi
50909
50910  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
50911    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
50912      # Solaris does not have _LP64=1 in the old build.
50913      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50914      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
50915    fi
50916  fi
50917
50918  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
50919  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50920    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50921        -Wunused-value -Woverloaded-virtual"
50922
50923    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50924
50925
50926
50927
50928
50929
50930
50931
50932
50933
50934
50935
50936
50937
50938
50939
50940
50941
50942
50943
50944
50945
50946
50947
50948
50949
50950
50951
50952
50953
50954
50955
50956
50957
50958
50959
50960
50961
50962
50963
50964
50965
50966
50967
50968
50969
50970
50971
50972
50973
50974
50975
50976
50977
50978    # Execute function body
50979
50980  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50981  REFERENCE_VERSION=4.8
50982
50983  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50984    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50985  fi
50986
50987  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50988    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50989  fi
50990
50991  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50992  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50993
50994  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50995    :
50996
50997            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50998            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50999
51000
51001  else
51002    :
51003
51004  fi
51005
51006
51007
51008
51009
51010
51011
51012
51013
51014
51015
51016
51017
51018
51019    fi
51020    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51021      # Non-zero builds have stricter warnings
51022      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51023    else
51024      if test "x$TOOLCHAIN_TYPE" = xclang; then
51025        # Some versions of llvm do not like -Wundef
51026        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51027      fi
51028    fi
51029  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51030    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51031        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51032  fi
51033
51034  # Additional macosx handling
51035  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51036    # Setting these parameters makes it an error to link to macosx APIs that are
51037    # newer than the given OS version and makes the linked binaries compatible
51038    # even if built on a newer version of the OS.
51039    # The expected format is X.Y.Z
51040    MACOSX_VERSION_MIN=10.7.0
51041
51042
51043    # The macro takes the version with no dots, ex: 1070
51044    # Let the flags variables get resolved in make for easier override on make
51045    # command line.
51046    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)"
51047    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51048  fi
51049
51050  # Setup some hard coded includes
51051  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51052      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51053      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51054      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51055      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51056      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51057      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51058
51059  # The shared libraries are compiled using the picflag.
51060  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51061      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51062  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51063      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51064
51065  # Executable flags
51066  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51067  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51068
51069
51070
51071
51072
51073
51074  # Setup LDFLAGS et al.
51075  #
51076
51077  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51078    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51079    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51080    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51081    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51082      LDFLAGS_SAFESH="-safeseh"
51083      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51084      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51085      # NOTE: Old build added -machine. Probably not needed.
51086      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51087    else
51088      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51089    fi
51090  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51091      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51092      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51093        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51094        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51095    fi
51096  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51097    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51098    # We have previously set HAS_GNU_HASH if this is the case
51099    if test -n "$HAS_GNU_HASH"; then
51100      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51101      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51102      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51103    fi
51104      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51105        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51106    fi
51107    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51108      # And since we now know that the linker is gnu, then add -z defs, to forbid
51109      # undefined symbols in object files.
51110      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51111      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51112      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51113      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51114      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51115      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51116        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51117      fi
51118      case $DEBUG_LEVEL in
51119        release )
51120          # tell linker to optimize libraries.
51121          # Should this be supplied to the OSS linker as well?
51122          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51123          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51124          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51125          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51126            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51127          fi
51128          ;;
51129        slowdebug )
51130          # Hotspot always let the linker optimize
51131          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51132          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51133            # do relocations at load
51134            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51135            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51136            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51137          fi
51138          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51139            # mark relocations read only
51140            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51141            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51142            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51143          fi
51144          ;;
51145        fastdebug )
51146          # Hotspot always let the linker optimize
51147          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51148          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51149            # mark relocations read only
51150            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51151            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51152            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51153          fi
51154          ;;
51155        * )
51156          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51157          ;;
51158        esac
51159    fi
51160  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51161    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51162    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51163    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51164    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51165    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51166    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51167      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51168    fi
51169  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51170    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51171    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51172    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51173  fi
51174
51175  # Customize LDFLAGS for executables
51176
51177  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51178
51179  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51180    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51181      LDFLAGS_STACK_SIZE=1048576
51182    else
51183      LDFLAGS_STACK_SIZE=327680
51184    fi
51185    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51186  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51187    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51188  fi
51189
51190  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51191
51192  # Customize LDFLAGS for libs
51193  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51194
51195  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51196  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51197    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51198        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51199    OPENJDK_BUILD_JDKLIB_LIBS=""
51200  else
51201    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51202        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)"
51203
51204    if test "xBUILD" = "xTARGET"; then
51205    # On some platforms (mac) the linker warns about non existing -L dirs.
51206    # Add server first if available. Linking aginst client does not always produce the same results.
51207      # Only add client/minimal dir if client/minimal is being built.
51208    # Default to server for other variants.
51209      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
51210        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51211      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
51212        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/client"
51213      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51214        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/minimal"
51215    else
51216        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51217    fi
51218    elif test "xBUILD" = "xBUILD"; then
51219      # When building a buildjdk, it's always only the server variant
51220      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51221          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51222    fi
51223
51224    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51225    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51226      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51227    fi
51228
51229  fi
51230
51231OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
51232
51233  # Set OPENJDK_BUILD_JVM_LIBS (per os)
51234  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51235    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51236  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51237    # FIXME: This hard-coded path is not really proper.
51238    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51239      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51240    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51241      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51242    fi
51243    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51244        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51245  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51246    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51247  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51248    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51249  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51250    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51251  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51252    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51253        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51254        wsock32.lib winmm.lib version.lib psapi.lib"
51255    fi
51256
51257  # Set OPENJDK_BUILD_JVM_ASFLAGS
51258  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51259    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51260      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51261    fi
51262  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51263    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51264  fi
51265
51266  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51267
51268
51269
51270
51271
51272
51273
51274
51275
51276
51277
51278
51279
51280
51281
51282  # Tests are only ever compiled for TARGET
51283  # Flags for compiling test libraries
51284  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51285  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51286
51287  # Flags for compiling test executables
51288  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51289  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51290
51291
51292
51293
51294
51295
51296  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51297  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
51298
51299
51300
51301
51302
51303
51304  # Some Zero and Shark settings.
51305  # ZERO_ARCHFLAG tells the compiler which mode to build for
51306  case "${OPENJDK_TARGET_CPU}" in
51307    s390)
51308      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51309      ;;
51310    *)
51311      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51312  esac
51313
51314
51315
51316
51317
51318
51319
51320
51321
51322
51323
51324
51325
51326
51327
51328
51329
51330
51331
51332
51333
51334
51335
51336
51337
51338
51339
51340
51341
51342
51343
51344
51345
51346
51347
51348
51349
51350
51351
51352
51353
51354
51355    # Execute function body
51356
51357
51358
51359
51360
51361
51362
51363
51364
51365
51366
51367
51368
51369
51370
51371
51372
51373
51374
51375
51376
51377
51378
51379
51380
51381
51382
51383
51384
51385
51386
51387
51388
51389
51390
51391
51392
51393
51394
51395
51396
51397
51398
51399
51400
51401
51402
51403
51404    # Execute function body
51405
51406  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51407$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51408  supports=yes
51409
51410  saved_cflags="$CFLAGS"
51411  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51412  ac_ext=c
51413ac_cpp='$CPP $CPPFLAGS'
51414ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51415ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51416ac_compiler_gnu=$ac_cv_c_compiler_gnu
51417
51418  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51419/* end confdefs.h.  */
51420int i;
51421_ACEOF
51422if ac_fn_c_try_compile "$LINENO"; then :
51423
51424else
51425  supports=no
51426fi
51427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51428  ac_ext=cpp
51429ac_cpp='$CXXCPP $CPPFLAGS'
51430ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51431ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51432ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51433
51434  CFLAGS="$saved_cflags"
51435
51436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51437$as_echo "$supports" >&6; }
51438  if test "x$supports" = "xyes" ; then
51439    :
51440    C_COMP_SUPPORTS="yes"
51441  else
51442    :
51443    C_COMP_SUPPORTS="no"
51444  fi
51445
51446
51447
51448
51449
51450
51451
51452
51453
51454
51455
51456
51457
51458
51459
51460
51461
51462
51463
51464
51465
51466
51467
51468
51469
51470
51471
51472
51473
51474
51475
51476
51477
51478
51479
51480
51481
51482
51483
51484
51485
51486
51487
51488
51489
51490
51491
51492
51493
51494
51495
51496
51497
51498
51499
51500
51501
51502
51503
51504    # Execute function body
51505
51506  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
51507$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51508  supports=yes
51509
51510  saved_cxxflags="$CXXFLAGS"
51511  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
51512  ac_ext=cpp
51513ac_cpp='$CXXCPP $CPPFLAGS'
51514ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51515ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51516ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51517
51518  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51519/* end confdefs.h.  */
51520int i;
51521_ACEOF
51522if ac_fn_cxx_try_compile "$LINENO"; then :
51523
51524else
51525  supports=no
51526fi
51527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51528  ac_ext=cpp
51529ac_cpp='$CXXCPP $CPPFLAGS'
51530ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51531ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51532ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51533
51534  CXXFLAGS="$saved_cxxflags"
51535
51536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51537$as_echo "$supports" >&6; }
51538  if test "x$supports" = "xyes" ; then
51539    :
51540    CXX_COMP_SUPPORTS="yes"
51541  else
51542    :
51543    CXX_COMP_SUPPORTS="no"
51544  fi
51545
51546
51547
51548
51549
51550
51551
51552
51553
51554
51555
51556
51557
51558  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
51559$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
51560  supports=no
51561  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51562
51563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51564$as_echo "$supports" >&6; }
51565  if test "x$supports" = "xyes" ; then
51566    :
51567
51568  else
51569    :
51570    ZERO_ARCHFLAG=""
51571  fi
51572
51573
51574
51575
51576
51577
51578
51579
51580  # Check that the compiler supports -mX (or -qX on AIX) flags
51581  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
51582
51583
51584
51585
51586
51587
51588
51589
51590
51591
51592
51593
51594
51595
51596
51597
51598
51599
51600
51601
51602
51603
51604
51605
51606
51607
51608
51609
51610
51611
51612
51613
51614
51615
51616
51617
51618
51619
51620
51621
51622
51623
51624
51625
51626
51627
51628
51629    # Execute function body
51630
51631
51632
51633
51634
51635
51636
51637
51638
51639
51640
51641
51642
51643
51644
51645
51646
51647
51648
51649
51650
51651
51652
51653
51654
51655
51656
51657
51658
51659
51660
51661
51662
51663
51664
51665
51666
51667
51668
51669
51670
51671
51672
51673
51674
51675
51676
51677
51678    # Execute function body
51679
51680  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51681$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51682  supports=yes
51683
51684  saved_cflags="$CFLAGS"
51685  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51686  ac_ext=c
51687ac_cpp='$CPP $CPPFLAGS'
51688ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51689ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51690ac_compiler_gnu=$ac_cv_c_compiler_gnu
51691
51692  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51693/* end confdefs.h.  */
51694int i;
51695_ACEOF
51696if ac_fn_c_try_compile "$LINENO"; then :
51697
51698else
51699  supports=no
51700fi
51701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51702  ac_ext=cpp
51703ac_cpp='$CXXCPP $CPPFLAGS'
51704ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51705ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51706ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51707
51708  CFLAGS="$saved_cflags"
51709
51710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51711$as_echo "$supports" >&6; }
51712  if test "x$supports" = "xyes" ; then
51713    :
51714    C_COMP_SUPPORTS="yes"
51715  else
51716    :
51717    C_COMP_SUPPORTS="no"
51718  fi
51719
51720
51721
51722
51723
51724
51725
51726
51727
51728
51729
51730
51731
51732
51733
51734
51735
51736
51737
51738
51739
51740
51741
51742
51743
51744
51745
51746
51747
51748
51749
51750
51751
51752
51753
51754
51755
51756
51757
51758
51759
51760
51761
51762
51763
51764
51765
51766
51767
51768
51769
51770
51771
51772
51773
51774
51775
51776
51777
51778    # Execute function body
51779
51780  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51781$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51782  supports=yes
51783
51784  saved_cxxflags="$CXXFLAGS"
51785  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51786  ac_ext=cpp
51787ac_cpp='$CXXCPP $CPPFLAGS'
51788ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51789ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51790ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51791
51792  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51793/* end confdefs.h.  */
51794int i;
51795_ACEOF
51796if ac_fn_cxx_try_compile "$LINENO"; then :
51797
51798else
51799  supports=no
51800fi
51801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51802  ac_ext=cpp
51803ac_cpp='$CXXCPP $CPPFLAGS'
51804ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51805ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51806ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51807
51808  CXXFLAGS="$saved_cxxflags"
51809
51810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51811$as_echo "$supports" >&6; }
51812  if test "x$supports" = "xyes" ; then
51813    :
51814    CXX_COMP_SUPPORTS="yes"
51815  else
51816    :
51817    CXX_COMP_SUPPORTS="no"
51818  fi
51819
51820
51821
51822
51823
51824
51825
51826
51827
51828
51829
51830
51831
51832  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51833$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51834  supports=no
51835  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51836
51837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51838$as_echo "$supports" >&6; }
51839  if test "x$supports" = "xyes" ; then
51840    :
51841    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
51842  else
51843    :
51844    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
51845  fi
51846
51847
51848
51849
51850
51851
51852
51853
51854  # Check whether --enable-warnings-as-errors was given.
51855if test "${enable_warnings_as_errors+set}" = set; then :
51856  enableval=$enable_warnings_as_errors;
51857fi
51858
51859
51860  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
51861$as_echo_n "checking if native warnings are errors... " >&6; }
51862  if test "x$enable_warnings_as_errors" = "xyes"; then
51863    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
51864$as_echo "yes (explicitely set)" >&6; }
51865    WARNINGS_AS_ERRORS=true
51866  elif test "x$enable_warnings_as_errors" = "xno"; then
51867    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51868$as_echo "no" >&6; }
51869    WARNINGS_AS_ERRORS=false
51870  elif test "x$enable_warnings_as_errors" = "x"; then
51871    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
51872$as_echo "yes (default)" >&6; }
51873    WARNINGS_AS_ERRORS=true
51874  else
51875    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
51876  fi
51877
51878  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
51879    # Set legacy hotspot variable
51880    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
51881  else
51882    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
51883  fi
51884
51885
51886
51887
51888  case "${TOOLCHAIN_TYPE}" in
51889    microsoft)
51890      DISABLE_WARNING_PREFIX="-wd"
51891      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
51892      ;;
51893    solstudio)
51894      DISABLE_WARNING_PREFIX="-erroff="
51895      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
51896      ;;
51897    gcc)
51898      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
51899
51900
51901
51902
51903
51904
51905
51906
51907
51908
51909
51910
51911
51912
51913
51914
51915
51916
51917
51918
51919
51920
51921
51922
51923
51924
51925
51926
51927
51928
51929
51930
51931
51932
51933
51934
51935
51936
51937
51938
51939
51940
51941
51942
51943
51944
51945
51946    # Execute function body
51947
51948
51949
51950
51951
51952
51953
51954
51955
51956
51957
51958
51959
51960
51961
51962
51963
51964
51965
51966
51967
51968
51969
51970
51971
51972
51973
51974
51975
51976
51977
51978
51979
51980
51981
51982
51983
51984
51985
51986
51987
51988
51989
51990
51991
51992
51993
51994
51995    # Execute function body
51996
51997  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
51998$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
51999  supports=yes
52000
52001  saved_cflags="$CFLAGS"
52002  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52003  ac_ext=c
52004ac_cpp='$CPP $CPPFLAGS'
52005ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52006ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52007ac_compiler_gnu=$ac_cv_c_compiler_gnu
52008
52009  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52010/* end confdefs.h.  */
52011int i;
52012_ACEOF
52013if ac_fn_c_try_compile "$LINENO"; then :
52014
52015else
52016  supports=no
52017fi
52018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52019  ac_ext=cpp
52020ac_cpp='$CXXCPP $CPPFLAGS'
52021ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52022ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52023ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52024
52025  CFLAGS="$saved_cflags"
52026
52027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52028$as_echo "$supports" >&6; }
52029  if test "x$supports" = "xyes" ; then
52030    :
52031    C_COMP_SUPPORTS="yes"
52032  else
52033    :
52034    C_COMP_SUPPORTS="no"
52035  fi
52036
52037
52038
52039
52040
52041
52042
52043
52044
52045
52046
52047
52048
52049
52050
52051
52052
52053
52054
52055
52056
52057
52058
52059
52060
52061
52062
52063
52064
52065
52066
52067
52068
52069
52070
52071
52072
52073
52074
52075
52076
52077
52078
52079
52080
52081
52082
52083
52084
52085
52086
52087
52088
52089
52090
52091
52092
52093
52094
52095    # Execute function body
52096
52097  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52098$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52099  supports=yes
52100
52101  saved_cxxflags="$CXXFLAGS"
52102  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52103  ac_ext=cpp
52104ac_cpp='$CXXCPP $CPPFLAGS'
52105ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52106ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52107ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52108
52109  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52110/* end confdefs.h.  */
52111int i;
52112_ACEOF
52113if ac_fn_cxx_try_compile "$LINENO"; then :
52114
52115else
52116  supports=no
52117fi
52118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52119  ac_ext=cpp
52120ac_cpp='$CXXCPP $CPPFLAGS'
52121ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52122ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52123ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52124
52125  CXXFLAGS="$saved_cxxflags"
52126
52127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52128$as_echo "$supports" >&6; }
52129  if test "x$supports" = "xyes" ; then
52130    :
52131    CXX_COMP_SUPPORTS="yes"
52132  else
52133    :
52134    CXX_COMP_SUPPORTS="no"
52135  fi
52136
52137
52138
52139
52140
52141
52142
52143
52144
52145
52146
52147
52148
52149  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52150$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52151  supports=no
52152  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52153
52154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52155$as_echo "$supports" >&6; }
52156  if test "x$supports" = "xyes" ; then
52157    :
52158    GCC_CAN_DISABLE_WARNINGS=true
52159  else
52160    :
52161    GCC_CAN_DISABLE_WARNINGS=false
52162
52163  fi
52164
52165
52166
52167
52168
52169
52170      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52171        DISABLE_WARNING_PREFIX="-Wno-"
52172      else
52173        DISABLE_WARNING_PREFIX=
52174      fi
52175      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52176      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52177      # CFLAGS since any target specific flags will likely not work with the
52178      # build compiler
52179      CC_OLD="$CC"
52180      CXX_OLD="$CXX"
52181      CC="$BUILD_CC"
52182      CXX="$BUILD_CXX"
52183      CFLAGS_OLD="$CFLAGS"
52184      CFLAGS=""
52185
52186
52187
52188
52189
52190
52191
52192
52193
52194
52195
52196
52197
52198
52199
52200
52201
52202
52203
52204
52205
52206
52207
52208
52209
52210
52211
52212
52213
52214
52215
52216
52217
52218
52219
52220
52221
52222
52223
52224
52225
52226
52227
52228
52229
52230
52231
52232    # Execute function body
52233
52234
52235
52236
52237
52238
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    # Execute function body
52282
52283  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52284$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52285  supports=yes
52286
52287  saved_cflags="$CFLAGS"
52288  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52289  ac_ext=c
52290ac_cpp='$CPP $CPPFLAGS'
52291ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52292ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52293ac_compiler_gnu=$ac_cv_c_compiler_gnu
52294
52295  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52296/* end confdefs.h.  */
52297int i;
52298_ACEOF
52299if ac_fn_c_try_compile "$LINENO"; then :
52300
52301else
52302  supports=no
52303fi
52304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52305  ac_ext=cpp
52306ac_cpp='$CXXCPP $CPPFLAGS'
52307ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52308ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52309ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52310
52311  CFLAGS="$saved_cflags"
52312
52313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52314$as_echo "$supports" >&6; }
52315  if test "x$supports" = "xyes" ; then
52316    :
52317    C_COMP_SUPPORTS="yes"
52318  else
52319    :
52320    C_COMP_SUPPORTS="no"
52321  fi
52322
52323
52324
52325
52326
52327
52328
52329
52330
52331
52332
52333
52334
52335
52336
52337
52338
52339
52340
52341
52342
52343
52344
52345
52346
52347
52348
52349
52350
52351
52352
52353
52354
52355
52356
52357
52358
52359
52360
52361
52362
52363
52364
52365
52366
52367
52368
52369
52370
52371
52372
52373
52374
52375
52376
52377
52378
52379
52380
52381    # Execute function body
52382
52383  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52384$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52385  supports=yes
52386
52387  saved_cxxflags="$CXXFLAGS"
52388  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52389  ac_ext=cpp
52390ac_cpp='$CXXCPP $CPPFLAGS'
52391ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52392ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52393ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52394
52395  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52396/* end confdefs.h.  */
52397int i;
52398_ACEOF
52399if ac_fn_cxx_try_compile "$LINENO"; then :
52400
52401else
52402  supports=no
52403fi
52404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52405  ac_ext=cpp
52406ac_cpp='$CXXCPP $CPPFLAGS'
52407ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52408ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52409ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52410
52411  CXXFLAGS="$saved_cxxflags"
52412
52413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52414$as_echo "$supports" >&6; }
52415  if test "x$supports" = "xyes" ; then
52416    :
52417    CXX_COMP_SUPPORTS="yes"
52418  else
52419    :
52420    CXX_COMP_SUPPORTS="no"
52421  fi
52422
52423
52424
52425
52426
52427
52428
52429
52430
52431
52432
52433
52434
52435  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52436$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52437  supports=no
52438  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52439
52440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52441$as_echo "$supports" >&6; }
52442  if test "x$supports" = "xyes" ; then
52443    :
52444    BUILD_CC_CAN_DISABLE_WARNINGS=true
52445  else
52446    :
52447    BUILD_CC_CAN_DISABLE_WARNINGS=false
52448
52449  fi
52450
52451
52452
52453
52454
52455
52456      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52457        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52458      else
52459        BUILD_CC_DISABLE_WARNING_PREFIX=
52460      fi
52461      CC="$CC_OLD"
52462      CXX="$CXX_OLD"
52463      CFLAGS="$CFLAGS_OLD"
52464      ;;
52465    clang)
52466      DISABLE_WARNING_PREFIX="-Wno-"
52467      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52468      ;;
52469    xlc)
52470      DISABLE_WARNING_PREFIX="-qsuppress="
52471      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52472      ;;
52473  esac
52474
52475
52476
52477
52478
52479# Setup debug symbols (need objcopy from the toolchain for that)
52480
52481  #
52482  # NATIVE_DEBUG_SYMBOLS
52483  # This must be done after the toolchain is setup, since we're looking at objcopy.
52484  #
52485  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52486$as_echo_n "checking what type of native debug symbols to use... " >&6; }
52487
52488# Check whether --with-native-debug-symbols was given.
52489if test "${with_native_debug_symbols+set}" = set; then :
52490  withval=$with_native_debug_symbols;
52491        if test "x$OPENJDK_TARGET_OS" = xaix; then
52492          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52493            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52494          fi
52495        fi
52496
52497else
52498
52499        if test "x$OPENJDK_TARGET_OS" = xaix; then
52500          # AIX doesn't support 'zipped' so use 'internal' as default
52501          with_native_debug_symbols="internal"
52502        else
52503          if test "x$STATIC_BUILD" = xtrue; then
52504            with_native_debug_symbols="none"
52505          else
52506            with_native_debug_symbols="zipped"
52507          fi
52508        fi
52509
52510fi
52511
52512  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52514$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52515
52516  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52517
52518    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52519      if test "x$OBJCOPY" = x; then
52520        # enabling of enable-debug-symbols and can't find objcopy
52521        # this is an error
52522        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52523      fi
52524    fi
52525
52526    COMPILE_WITH_DEBUG_SYMBOLS=true
52527    COPY_DEBUG_SYMBOLS=true
52528    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52529
52530    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52531    DEBUG_BINARIES=false
52532    STRIP_POLICY=min_strip
52533
52534  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52535    COMPILE_WITH_DEBUG_SYMBOLS=false
52536    COPY_DEBUG_SYMBOLS=false
52537    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52538
52539    DEBUG_BINARIES=false
52540    STRIP_POLICY=no_strip
52541  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52542    COMPILE_WITH_DEBUG_SYMBOLS=true
52543    COPY_DEBUG_SYMBOLS=false
52544    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52545
52546    # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
52547    DEBUG_BINARIES=true
52548    STRIP_POLICY=no_strip
52549    STRIP=""
52550
52551  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52552
52553    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52554      if test "x$OBJCOPY" = x; then
52555        # enabling of enable-debug-symbols and can't find objcopy
52556        # this is an error
52557        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52558      fi
52559    fi
52560
52561    COMPILE_WITH_DEBUG_SYMBOLS=true
52562    COPY_DEBUG_SYMBOLS=true
52563    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52564
52565    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52566    DEBUG_BINARIES=false
52567    STRIP_POLICY=min_strip
52568  else
52569    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52570  fi
52571
52572  # --enable-debug-symbols is deprecated.
52573  # Please use --with-native-debug-symbols=[internal,external,zipped] .
52574
52575  # Check whether --enable-debug-symbols was given.
52576if test "${enable_debug_symbols+set}" = set; then :
52577  enableval=$enable_debug_symbols;
52578fi
52579
52580  if test "x$enable_debug_symbols" != x; then
52581    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52582$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52583
52584    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52585      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52586$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52587    fi
52588
52589  fi
52590
52591
52592  # --enable-zip-debug-info is deprecated.
52593  # Please use --with-native-debug-symbols=zipped .
52594
52595  # Check whether --enable-zip-debug-info was given.
52596if test "${enable_zip_debug_info+set}" = set; then :
52597  enableval=$enable_zip_debug_info;
52598fi
52599
52600  if test "x$enable_zip_debug_info" != x; then
52601    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52602$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52603
52604    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52605      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52606$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52607    fi
52608
52609  fi
52610
52611
52612
52613
52614
52615
52616  # Legacy values
52617
52618
52619
52620
52621  # Check whether --enable-native-coverage was given.
52622if test "${enable_native_coverage+set}" = set; then :
52623  enableval=$enable_native_coverage;
52624fi
52625
52626  GCOV_ENABLED="false"
52627  if test "x$enable_native_coverage" = "xyes"; then
52628    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52629      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52630$as_echo_n "checking if native coverage is enabled... " >&6; }
52631      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52632$as_echo "yes" >&6; }
52633      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52634      GCOV_LDFLAGS="-fprofile-arcs"
52635      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
52636      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
52637      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
52638      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52639      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52640      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52641      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52642      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52643      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52644      GCOV_ENABLED="true"
52645    else
52646      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52647    fi
52648  elif test "x$enable_native_coverage" = "xno"; then
52649    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52650$as_echo_n "checking if native coverage is enabled... " >&6; }
52651    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52652$as_echo "no" >&6; }
52653  elif test "x$enable_native_coverage" != "x"; then
52654    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52655  fi
52656
52657
52658
52659
52660# Need toolchain to setup dtrace
52661
52662  # Test for dtrace dependencies
52663  # Check whether --enable-dtrace was given.
52664if test "${enable_dtrace+set}" = set; then :
52665  enableval=$enable_dtrace;
52666fi
52667
52668
52669  DTRACE_DEP_MISSING=false
52670
52671  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52672$as_echo_n "checking for dtrace tool... " >&6; }
52673  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52674    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52675$as_echo "$DTRACE" >&6; }
52676  else
52677    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52678$as_echo "not found, cannot build dtrace" >&6; }
52679    DTRACE_DEP_MISSING=true
52680  fi
52681
52682  for ac_header in sys/sdt.h
52683do :
52684  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52685if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52686  cat >>confdefs.h <<_ACEOF
52687#define HAVE_SYS_SDT_H 1
52688_ACEOF
52689 DTRACE_HEADERS_OK=yes
52690else
52691  DTRACE_HEADERS_OK=no
52692fi
52693
52694done
52695
52696  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52697    DTRACE_DEP_MISSING=true
52698  fi
52699
52700  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52701$as_echo_n "checking if dtrace should be built... " >&6; }
52702  if test "x$enable_dtrace" = "xyes"; then
52703    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52704      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52705$as_echo "no, missing dependencies" >&6; }
52706
52707  # Print a helpful message on how to acquire the necessary build dependency.
52708  # dtrace is the help tag: freetype, cups, alsa etc
52709  MISSING_DEPENDENCY=dtrace
52710
52711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52712    cygwin_help $MISSING_DEPENDENCY
52713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52714    msys_help $MISSING_DEPENDENCY
52715  else
52716    PKGHANDLER_COMMAND=
52717
52718    case $PKGHANDLER in
52719      apt-get)
52720        apt_help     $MISSING_DEPENDENCY ;;
52721      yum)
52722        yum_help     $MISSING_DEPENDENCY ;;
52723      port)
52724        port_help    $MISSING_DEPENDENCY ;;
52725      pkgutil)
52726        pkgutil_help $MISSING_DEPENDENCY ;;
52727      pkgadd)
52728        pkgadd_help  $MISSING_DEPENDENCY ;;
52729    esac
52730
52731    if test "x$PKGHANDLER_COMMAND" != x; then
52732      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52733    fi
52734  fi
52735
52736      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52737    else
52738      INCLUDE_DTRACE=true
52739      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52740$as_echo "yes, forced" >&6; }
52741    fi
52742  elif test "x$enable_dtrace" = "xno"; then
52743    INCLUDE_DTRACE=false
52744    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52745$as_echo "no, forced" >&6; }
52746  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52747    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52748      INCLUDE_DTRACE=false
52749      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52750$as_echo "no, missing dependencies" >&6; }
52751    else
52752      INCLUDE_DTRACE=true
52753      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52754$as_echo "yes, dependencies present" >&6; }
52755    fi
52756  else
52757    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52758  fi
52759
52760
52761
52762  # The user can in some cases supply additional jvm features. For the custom
52763  # variant, this defines the entire variant.
52764
52765# Check whether --with-jvm-features was given.
52766if test "${with_jvm_features+set}" = set; then :
52767  withval=$with_jvm_features;
52768fi
52769
52770  if test "x$with_jvm_features" != x; then
52771    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
52772$as_echo_n "checking additional JVM features... " >&6; }
52773    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
52774    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
52775$as_echo "$JVM_FEATURES" >&6; }
52776  fi
52777
52778  # Verify that dependencies are met for explicitly set features.
52779  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
52780    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
52781  fi
52782
52783  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
52784    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
52785  fi
52786
52787  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
52788    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
52789  fi
52790
52791  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52792    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
52793  fi
52794
52795  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52796    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
52797  fi
52798
52799  # Turn on additional features based on other parts of configure
52800  if test "x$INCLUDE_DTRACE" = "xtrue"; then
52801    JVM_FEATURES="$JVM_FEATURES dtrace"
52802  else
52803    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
52804      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
52805    fi
52806  fi
52807
52808  if test "x$STATIC_BUILD" = "xtrue"; then
52809    JVM_FEATURES="$JVM_FEATURES static-build"
52810  else
52811    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
52812      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
52813    fi
52814  fi
52815
52816  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52817    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
52818      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
52819    fi
52820  fi
52821
52822  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52823    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
52824      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
52825    fi
52826  fi
52827
52828  # Only enable jvmci on x86_64, sparcv9 and aarch64.
52829  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
52830      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
52831      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
52832    JVM_FEATURES_jvmci="jvmci"
52833  else
52834    JVM_FEATURES_jvmci=""
52835  fi
52836
52837  # All variants but minimal (and custom) get these features
52838  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
52839
52840  # Enable features depending on variant.
52841  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52842  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52843  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
52844  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
52845  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
52846  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
52847  JVM_FEATURES_custom="$JVM_FEATURES"
52848
52849
52850
52851
52852
52853
52854
52855
52856
52857  # Used for verification of Makefiles by check-jvm-feature
52858
52859
52860  # We don't support --with-jvm-interpreter anymore, use zero instead.
52861
52862
52863# Check whether --with-jvm-interpreter was given.
52864if test "${with_jvm_interpreter+set}" = set; then :
52865  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
52866$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
52867fi
52868
52869
52870
52871
52872  # Check whether --enable-hotspot-gtest was given.
52873if test "${enable_hotspot_gtest+set}" = set; then :
52874  enableval=$enable_hotspot_gtest;
52875fi
52876
52877
52878  if test -e "$HOTSPOT_TOPDIR/test/native"; then
52879    GTEST_DIR_EXISTS="true"
52880  else
52881    GTEST_DIR_EXISTS="false"
52882  fi
52883
52884  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
52885$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
52886  if test "x$enable_hotspot_gtest" = "xyes"; then
52887    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
52888      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52889$as_echo "yes, forced" >&6; }
52890      BUILD_GTEST="true"
52891    else
52892      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
52893    fi
52894  elif test "x$enable_hotspot_gtest" = "xno"; then
52895    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52896$as_echo "no, forced" >&6; }
52897    BUILD_GTEST="false"
52898  elif test "x$enable_hotspot_gtest" = "x"; then
52899    if test "x$GTEST_DIR_EXISTS" = "xtrue" && test "x$OPENJDK_TARGET_OS" != "xaix"; then
52900      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52901$as_echo "yes" >&6; }
52902      BUILD_GTEST="true"
52903    else
52904      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52905$as_echo "no" >&6; }
52906      BUILD_GTEST="false"
52907    fi
52908  else
52909    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
52910  fi
52911
52912
52913
52914
52915###############################################################################
52916#
52917# Check dependencies for external and internal libraries.
52918#
52919###############################################################################
52920
52921# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
52922
52923  # When using cygwin or msys, we need a wrapper binary that renames
52924  # /cygdrive/c/ arguments into c:/ arguments and peeks into
52925  # @files and rewrites these too! This wrapper binary is
52926  # called fixpath.
52927  FIXPATH=
52928  if test "x$OPENJDK_BUILD_OS" = xwindows; then
52929    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
52930$as_echo_n "checking if fixpath can be created... " >&6; }
52931    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
52932    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
52933    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
52934    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
52935      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
52936      FIXPATH="$FIXPATH_BIN -c"
52937    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
52938      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
52939      # @ was chosen as separator to minimize risk of other tools messing around with it
52940      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
52941          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
52942      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
52943      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
52944    fi
52945    FIXPATH_SRC_W="$FIXPATH_SRC"
52946    FIXPATH_BIN_W="$FIXPATH_BIN"
52947
52948  unix_path="$FIXPATH_SRC_W"
52949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52950    windows_path=`$CYGPATH -m "$unix_path"`
52951    FIXPATH_SRC_W="$windows_path"
52952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52953    windows_path=`cmd //c echo $unix_path`
52954    FIXPATH_SRC_W="$windows_path"
52955  fi
52956
52957
52958  unix_path="$FIXPATH_BIN_W"
52959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52960    windows_path=`$CYGPATH -m "$unix_path"`
52961    FIXPATH_BIN_W="$windows_path"
52962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52963    windows_path=`cmd //c echo $unix_path`
52964    FIXPATH_BIN_W="$windows_path"
52965  fi
52966
52967    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
52968    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
52969    cd $FIXPATH_DIR
52970    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
52971    cd $CURDIR
52972
52973    if test ! -x $FIXPATH_BIN; then
52974      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52975$as_echo "no" >&6; }
52976      cat $FIXPATH_DIR/fixpath1.log
52977      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
52978    fi
52979    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52980$as_echo "yes" >&6; }
52981    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
52982$as_echo_n "checking if fixpath.exe works... " >&6; }
52983    cd $FIXPATH_DIR
52984    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
52985        > $FIXPATH_DIR/fixpath2.log 2>&1
52986    cd $CURDIR
52987    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
52988      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52989$as_echo "no" >&6; }
52990      cat $FIXPATH_DIR/fixpath2.log
52991      as_fn_error $? "fixpath did not work!" "$LINENO" 5
52992    fi
52993    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52994$as_echo "yes" >&6; }
52995
52996    FIXPATH_DETACH_FLAG="--detach"
52997  fi
52998
52999
53000
53001
53002
53003
53004  # Check if X11 is needed
53005  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53006    # No X11 support on windows or macosx
53007    NEEDS_LIB_X11=false
53008  else
53009    # All other instances need X11, even if building headless only, libawt still
53010    # needs X11 headers.
53011    NEEDS_LIB_X11=true
53012  fi
53013
53014  # Check if cups is needed
53015  if test "x$OPENJDK_TARGET_OS" = xwindows; then
53016    # Windows have a separate print system
53017    NEEDS_LIB_CUPS=false
53018  else
53019    NEEDS_LIB_CUPS=true
53020  fi
53021
53022  # A custom hook may have set this already
53023  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53024    NEEDS_LIB_FREETYPE=true
53025  fi
53026
53027  # Check if alsa is needed
53028  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53029    NEEDS_LIB_ALSA=true
53030  else
53031    NEEDS_LIB_ALSA=false
53032  fi
53033
53034  # Check if ffi is needed
53035  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53036    NEEDS_LIB_FFI=true
53037  else
53038    NEEDS_LIB_FFI=false
53039  fi
53040
53041
53042  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53043  # dynamic build is configured on command line.
53044
53045# Check whether --with-stdc++lib was given.
53046if test "${with_stdc__lib+set}" = set; then :
53047  withval=$with_stdc__lib;
53048        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53049                && test "x$with_stdc__lib" != xdefault; then
53050          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53051        fi
53052
53053else
53054  with_stdc__lib=default
53055
53056fi
53057
53058
53059  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53060    # Test if stdc++ can be linked statically.
53061    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53062$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53063    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
53064    ac_ext=cpp
53065ac_cpp='$CXXCPP $CPPFLAGS'
53066ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53067ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53068ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53069
53070    OLD_LIBS="$LIBS"
53071    LIBS="$STATIC_STDCXX_FLAGS"
53072    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53073/* end confdefs.h.  */
53074
53075int
53076main ()
53077{
53078return 0;
53079  ;
53080  return 0;
53081}
53082_ACEOF
53083if ac_fn_cxx_try_link "$LINENO"; then :
53084  has_static_libstdcxx=yes
53085else
53086  has_static_libstdcxx=no
53087fi
53088rm -f core conftest.err conftest.$ac_objext \
53089    conftest$ac_exeext conftest.$ac_ext
53090    LIBS="$OLD_LIBS"
53091    ac_ext=cpp
53092ac_cpp='$CXXCPP $CPPFLAGS'
53093ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53094ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53095ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53096
53097    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53098$as_echo "$has_static_libstdcxx" >&6; }
53099
53100    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53101      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53102    fi
53103
53104    # If dynamic was requested, it's available since it would fail above otherwise.
53105    # If dynamic wasn't requested, go with static unless it isn't available.
53106    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53107$as_echo_n "checking how to link with libstdc++... " >&6; }
53108    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
53109        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53110      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53111$as_echo "dynamic" >&6; }
53112    else
53113      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53114      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53115      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53116      # just use the same setting as for the TARGET toolchain.
53117      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53118      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53119$as_echo "static" >&6; }
53120    fi
53121  fi
53122
53123  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53124  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53125    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53126  fi
53127
53128
53129
53130  # Setup Windows runtime dlls
53131  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53132
53133
53134# Check whether --with-msvcr-dll was given.
53135if test "${with_msvcr_dll+set}" = set; then :
53136  withval=$with_msvcr_dll;
53137fi
53138
53139
53140  if test "x$with_msvcr_dll" != x; then
53141    # If given explicitely by user, do not probe. If not present, fail directly.
53142
53143  DLL_NAME="$MSVCR_NAME"
53144  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53145  METHOD="--with-msvcr-dll"
53146  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53147    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53148$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53149
53150    # Need to check if the found msvcr is correct architecture
53151    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53152$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53153    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53154    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53155      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53156      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53157      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53158        CORRECT_MSVCR_ARCH="PE32 executable"
53159      else
53160        CORRECT_MSVCR_ARCH="PE32+ executable"
53161      fi
53162    else
53163      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53164        CORRECT_MSVCR_ARCH=386
53165      else
53166        CORRECT_MSVCR_ARCH=x86-64
53167      fi
53168    fi
53169    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53170      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53171$as_echo "ok" >&6; }
53172      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53173
53174  # Only process if variable expands to non-empty
53175
53176  if test "x$MSVC_DLL" != x; then
53177    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53178
53179  # Input might be given as Windows format, start by converting to
53180  # unix format.
53181  path="$MSVC_DLL"
53182  new_path=`$CYGPATH -u "$path"`
53183
53184  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53185  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53186  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53187  # "foo.exe" is OK but "foo" is an error.
53188  #
53189  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53190  # It is also a way to make sure we got the proper file name for the real test later on.
53191  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53192  if test "x$test_shortpath" = x; then
53193    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53194$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53195    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53196  fi
53197
53198  # Call helper function which possibly converts this using DOS-style short mode.
53199  # If so, the updated path is stored in $new_path.
53200
53201  input_path="$new_path"
53202  # Check if we need to convert this using DOS-style short mode. If the path
53203  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53204  # take no chances and rewrite it.
53205  # Note: m4 eats our [], so we need to use [ and ] instead.
53206  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53207  if test "x$has_forbidden_chars" != x; then
53208    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53209    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53210    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53211    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53212      # Going to short mode and back again did indeed matter. Since short mode is
53213      # case insensitive, let's make it lowercase to improve readability.
53214      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53215      # Now convert it back to Unix-style (cygpath)
53216      input_path=`$CYGPATH -u "$shortmode_path"`
53217      new_path="$input_path"
53218    fi
53219  fi
53220
53221  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53222  if test "x$test_cygdrive_prefix" = x; then
53223    # As a simple fix, exclude /usr/bin since it's not a real path.
53224    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53225      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53226      # a path prefixed by /cygdrive for fixpath to work.
53227      new_path="$CYGWIN_ROOT_PATH$input_path"
53228    fi
53229  fi
53230
53231
53232  if test "x$path" != "x$new_path"; then
53233    MSVC_DLL="$new_path"
53234    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53235$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53236  fi
53237
53238    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53239
53240  path="$MSVC_DLL"
53241  has_colon=`$ECHO $path | $GREP ^.:`
53242  new_path="$path"
53243  if test "x$has_colon" = x; then
53244    # Not in mixed or Windows style, start by that.
53245    new_path=`cmd //c echo $path`
53246  fi
53247
53248
53249  input_path="$new_path"
53250  # Check if we need to convert this using DOS-style short mode. If the path
53251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53252  # take no chances and rewrite it.
53253  # Note: m4 eats our [], so we need to use [ and ] instead.
53254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53255  if test "x$has_forbidden_chars" != x; then
53256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53257    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53258  fi
53259
53260
53261  windows_path="$new_path"
53262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53263    unix_path=`$CYGPATH -u "$windows_path"`
53264    new_path="$unix_path"
53265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53266    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53267    new_path="$unix_path"
53268  fi
53269
53270  if test "x$path" != "x$new_path"; then
53271    MSVC_DLL="$new_path"
53272    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53273$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53274  fi
53275
53276  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53277  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53278
53279    else
53280      # We're on a unix platform. Hooray! :)
53281      path="$MSVC_DLL"
53282      has_space=`$ECHO "$path" | $GREP " "`
53283      if test "x$has_space" != x; then
53284        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53285$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53286        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53287      fi
53288
53289      # Use eval to expand a potential ~
53290      eval path="$path"
53291      if test ! -f "$path" && test ! -d "$path"; then
53292        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53293      fi
53294
53295      if test -d "$path"; then
53296        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53297      else
53298        dir="`$DIRNAME "$path"`"
53299        base="`$BASENAME "$path"`"
53300        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53301      fi
53302    fi
53303  fi
53304
53305      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53306$as_echo_n "checking for $DLL_NAME... " >&6; }
53307      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53308$as_echo "$MSVC_DLL" >&6; }
53309    else
53310      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53311$as_echo "incorrect, ignoring" >&6; }
53312      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53313$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53314    fi
53315  fi
53316
53317    if test "x$MSVC_DLL" = x; then
53318      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53319    fi
53320    MSVCR_DLL="$MSVC_DLL"
53321  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53322
53323  DLL_NAME="$MSVCR_NAME"
53324  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53325  METHOD="devkit"
53326  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53327    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53328$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53329
53330    # Need to check if the found msvcr is correct architecture
53331    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53332$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53333    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53334    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53335      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53336      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53337      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53338        CORRECT_MSVCR_ARCH="PE32 executable"
53339      else
53340        CORRECT_MSVCR_ARCH="PE32+ executable"
53341      fi
53342    else
53343      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53344        CORRECT_MSVCR_ARCH=386
53345      else
53346        CORRECT_MSVCR_ARCH=x86-64
53347      fi
53348    fi
53349    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53350      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53351$as_echo "ok" >&6; }
53352      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53353
53354  # Only process if variable expands to non-empty
53355
53356  if test "x$MSVC_DLL" != x; then
53357    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53358
53359  # Input might be given as Windows format, start by converting to
53360  # unix format.
53361  path="$MSVC_DLL"
53362  new_path=`$CYGPATH -u "$path"`
53363
53364  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53365  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53366  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53367  # "foo.exe" is OK but "foo" is an error.
53368  #
53369  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53370  # It is also a way to make sure we got the proper file name for the real test later on.
53371  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53372  if test "x$test_shortpath" = x; then
53373    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53374$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53375    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53376  fi
53377
53378  # Call helper function which possibly converts this using DOS-style short mode.
53379  # If so, the updated path is stored in $new_path.
53380
53381  input_path="$new_path"
53382  # Check if we need to convert this using DOS-style short mode. If the path
53383  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53384  # take no chances and rewrite it.
53385  # Note: m4 eats our [], so we need to use [ and ] instead.
53386  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53387  if test "x$has_forbidden_chars" != x; then
53388    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53389    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53390    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53391    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53392      # Going to short mode and back again did indeed matter. Since short mode is
53393      # case insensitive, let's make it lowercase to improve readability.
53394      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53395      # Now convert it back to Unix-style (cygpath)
53396      input_path=`$CYGPATH -u "$shortmode_path"`
53397      new_path="$input_path"
53398    fi
53399  fi
53400
53401  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53402  if test "x$test_cygdrive_prefix" = x; then
53403    # As a simple fix, exclude /usr/bin since it's not a real path.
53404    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53405      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53406      # a path prefixed by /cygdrive for fixpath to work.
53407      new_path="$CYGWIN_ROOT_PATH$input_path"
53408    fi
53409  fi
53410
53411
53412  if test "x$path" != "x$new_path"; then
53413    MSVC_DLL="$new_path"
53414    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53415$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53416  fi
53417
53418    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53419
53420  path="$MSVC_DLL"
53421  has_colon=`$ECHO $path | $GREP ^.:`
53422  new_path="$path"
53423  if test "x$has_colon" = x; then
53424    # Not in mixed or Windows style, start by that.
53425    new_path=`cmd //c echo $path`
53426  fi
53427
53428
53429  input_path="$new_path"
53430  # Check if we need to convert this using DOS-style short mode. If the path
53431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53432  # take no chances and rewrite it.
53433  # Note: m4 eats our [], so we need to use [ and ] instead.
53434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53435  if test "x$has_forbidden_chars" != x; then
53436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53437    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53438  fi
53439
53440
53441  windows_path="$new_path"
53442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53443    unix_path=`$CYGPATH -u "$windows_path"`
53444    new_path="$unix_path"
53445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53447    new_path="$unix_path"
53448  fi
53449
53450  if test "x$path" != "x$new_path"; then
53451    MSVC_DLL="$new_path"
53452    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53453$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53454  fi
53455
53456  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53457  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53458
53459    else
53460      # We're on a unix platform. Hooray! :)
53461      path="$MSVC_DLL"
53462      has_space=`$ECHO "$path" | $GREP " "`
53463      if test "x$has_space" != x; then
53464        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53465$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53466        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53467      fi
53468
53469      # Use eval to expand a potential ~
53470      eval path="$path"
53471      if test ! -f "$path" && test ! -d "$path"; then
53472        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53473      fi
53474
53475      if test -d "$path"; then
53476        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53477      else
53478        dir="`$DIRNAME "$path"`"
53479        base="`$BASENAME "$path"`"
53480        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53481      fi
53482    fi
53483  fi
53484
53485      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53486$as_echo_n "checking for $DLL_NAME... " >&6; }
53487      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53488$as_echo "$MSVC_DLL" >&6; }
53489    else
53490      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53491$as_echo "incorrect, ignoring" >&6; }
53492      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53493$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53494    fi
53495  fi
53496
53497    if test "x$MSVC_DLL" = x; then
53498      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53499    fi
53500    MSVCR_DLL="$MSVC_DLL"
53501  else
53502
53503  DLL_NAME="${MSVCR_NAME}"
53504  MSVC_DLL=
53505
53506  if test "x$MSVC_DLL" = x; then
53507    # Probe: Using well-known location from Visual Studio 10.0
53508    if test "x$VCINSTALLDIR" != x; then
53509      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53510
53511  windows_path="$CYGWIN_VC_INSTALL_DIR"
53512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53513    unix_path=`$CYGPATH -u "$windows_path"`
53514    CYGWIN_VC_INSTALL_DIR="$unix_path"
53515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53516    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53517    CYGWIN_VC_INSTALL_DIR="$unix_path"
53518  fi
53519
53520      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53521        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53522      else
53523        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53524      fi
53525      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53526
53527  DLL_NAME="$DLL_NAME"
53528  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53529  METHOD="well-known location in VCINSTALLDIR"
53530  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53531    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53532$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53533
53534    # Need to check if the found msvcr is correct architecture
53535    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53536$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53537    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53538    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53539      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53540      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53541      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53542        CORRECT_MSVCR_ARCH="PE32 executable"
53543      else
53544        CORRECT_MSVCR_ARCH="PE32+ executable"
53545      fi
53546    else
53547      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53548        CORRECT_MSVCR_ARCH=386
53549      else
53550        CORRECT_MSVCR_ARCH=x86-64
53551      fi
53552    fi
53553    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53554      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53555$as_echo "ok" >&6; }
53556      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53557
53558  # Only process if variable expands to non-empty
53559
53560  if test "x$MSVC_DLL" != x; then
53561    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53562
53563  # Input might be given as Windows format, start by converting to
53564  # unix format.
53565  path="$MSVC_DLL"
53566  new_path=`$CYGPATH -u "$path"`
53567
53568  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53569  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53570  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53571  # "foo.exe" is OK but "foo" is an error.
53572  #
53573  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53574  # It is also a way to make sure we got the proper file name for the real test later on.
53575  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53576  if test "x$test_shortpath" = x; then
53577    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53578$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53579    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53580  fi
53581
53582  # Call helper function which possibly converts this using DOS-style short mode.
53583  # If so, the updated path is stored in $new_path.
53584
53585  input_path="$new_path"
53586  # Check if we need to convert this using DOS-style short mode. If the path
53587  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53588  # take no chances and rewrite it.
53589  # Note: m4 eats our [], so we need to use [ and ] instead.
53590  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53591  if test "x$has_forbidden_chars" != x; then
53592    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53593    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53594    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53595    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53596      # Going to short mode and back again did indeed matter. Since short mode is
53597      # case insensitive, let's make it lowercase to improve readability.
53598      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53599      # Now convert it back to Unix-style (cygpath)
53600      input_path=`$CYGPATH -u "$shortmode_path"`
53601      new_path="$input_path"
53602    fi
53603  fi
53604
53605  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53606  if test "x$test_cygdrive_prefix" = x; then
53607    # As a simple fix, exclude /usr/bin since it's not a real path.
53608    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53609      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53610      # a path prefixed by /cygdrive for fixpath to work.
53611      new_path="$CYGWIN_ROOT_PATH$input_path"
53612    fi
53613  fi
53614
53615
53616  if test "x$path" != "x$new_path"; then
53617    MSVC_DLL="$new_path"
53618    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53619$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53620  fi
53621
53622    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53623
53624  path="$MSVC_DLL"
53625  has_colon=`$ECHO $path | $GREP ^.:`
53626  new_path="$path"
53627  if test "x$has_colon" = x; then
53628    # Not in mixed or Windows style, start by that.
53629    new_path=`cmd //c echo $path`
53630  fi
53631
53632
53633  input_path="$new_path"
53634  # Check if we need to convert this using DOS-style short mode. If the path
53635  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53636  # take no chances and rewrite it.
53637  # Note: m4 eats our [], so we need to use [ and ] instead.
53638  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53639  if test "x$has_forbidden_chars" != x; then
53640    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53641    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53642  fi
53643
53644
53645  windows_path="$new_path"
53646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53647    unix_path=`$CYGPATH -u "$windows_path"`
53648    new_path="$unix_path"
53649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53651    new_path="$unix_path"
53652  fi
53653
53654  if test "x$path" != "x$new_path"; then
53655    MSVC_DLL="$new_path"
53656    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53657$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53658  fi
53659
53660  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53661  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53662
53663    else
53664      # We're on a unix platform. Hooray! :)
53665      path="$MSVC_DLL"
53666      has_space=`$ECHO "$path" | $GREP " "`
53667      if test "x$has_space" != x; then
53668        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53669$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53670        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53671      fi
53672
53673      # Use eval to expand a potential ~
53674      eval path="$path"
53675      if test ! -f "$path" && test ! -d "$path"; then
53676        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53677      fi
53678
53679      if test -d "$path"; then
53680        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53681      else
53682        dir="`$DIRNAME "$path"`"
53683        base="`$BASENAME "$path"`"
53684        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53685      fi
53686    fi
53687  fi
53688
53689      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53690$as_echo_n "checking for $DLL_NAME... " >&6; }
53691      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53692$as_echo "$MSVC_DLL" >&6; }
53693    else
53694      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53695$as_echo "incorrect, ignoring" >&6; }
53696      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53697$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53698    fi
53699  fi
53700
53701    fi
53702  fi
53703
53704  if test "x$MSVC_DLL" = x; then
53705    # Probe: Check in the Boot JDK directory.
53706    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53707
53708  DLL_NAME="$DLL_NAME"
53709  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53710  METHOD="well-known location in Boot JDK"
53711  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53712    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53713$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53714
53715    # Need to check if the found msvcr is correct architecture
53716    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53717$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53718    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53719    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53720      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53721      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53722      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53723        CORRECT_MSVCR_ARCH="PE32 executable"
53724      else
53725        CORRECT_MSVCR_ARCH="PE32+ executable"
53726      fi
53727    else
53728      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53729        CORRECT_MSVCR_ARCH=386
53730      else
53731        CORRECT_MSVCR_ARCH=x86-64
53732      fi
53733    fi
53734    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53735      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53736$as_echo "ok" >&6; }
53737      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53738
53739  # Only process if variable expands to non-empty
53740
53741  if test "x$MSVC_DLL" != x; then
53742    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53743
53744  # Input might be given as Windows format, start by converting to
53745  # unix format.
53746  path="$MSVC_DLL"
53747  new_path=`$CYGPATH -u "$path"`
53748
53749  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53750  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53751  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53752  # "foo.exe" is OK but "foo" is an error.
53753  #
53754  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53755  # It is also a way to make sure we got the proper file name for the real test later on.
53756  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53757  if test "x$test_shortpath" = x; then
53758    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53759$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53760    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53761  fi
53762
53763  # Call helper function which possibly converts this using DOS-style short mode.
53764  # If so, the updated path is stored in $new_path.
53765
53766  input_path="$new_path"
53767  # Check if we need to convert this using DOS-style short mode. If the path
53768  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53769  # take no chances and rewrite it.
53770  # Note: m4 eats our [], so we need to use [ and ] instead.
53771  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53772  if test "x$has_forbidden_chars" != x; then
53773    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53774    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53775    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53776    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53777      # Going to short mode and back again did indeed matter. Since short mode is
53778      # case insensitive, let's make it lowercase to improve readability.
53779      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53780      # Now convert it back to Unix-style (cygpath)
53781      input_path=`$CYGPATH -u "$shortmode_path"`
53782      new_path="$input_path"
53783    fi
53784  fi
53785
53786  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53787  if test "x$test_cygdrive_prefix" = x; then
53788    # As a simple fix, exclude /usr/bin since it's not a real path.
53789    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53790      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53791      # a path prefixed by /cygdrive for fixpath to work.
53792      new_path="$CYGWIN_ROOT_PATH$input_path"
53793    fi
53794  fi
53795
53796
53797  if test "x$path" != "x$new_path"; then
53798    MSVC_DLL="$new_path"
53799    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53800$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53801  fi
53802
53803    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53804
53805  path="$MSVC_DLL"
53806  has_colon=`$ECHO $path | $GREP ^.:`
53807  new_path="$path"
53808  if test "x$has_colon" = x; then
53809    # Not in mixed or Windows style, start by that.
53810    new_path=`cmd //c echo $path`
53811  fi
53812
53813
53814  input_path="$new_path"
53815  # Check if we need to convert this using DOS-style short mode. If the path
53816  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53817  # take no chances and rewrite it.
53818  # Note: m4 eats our [], so we need to use [ and ] instead.
53819  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53820  if test "x$has_forbidden_chars" != x; then
53821    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53822    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53823  fi
53824
53825
53826  windows_path="$new_path"
53827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53828    unix_path=`$CYGPATH -u "$windows_path"`
53829    new_path="$unix_path"
53830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53832    new_path="$unix_path"
53833  fi
53834
53835  if test "x$path" != "x$new_path"; then
53836    MSVC_DLL="$new_path"
53837    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53838$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53839  fi
53840
53841  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53842  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53843
53844    else
53845      # We're on a unix platform. Hooray! :)
53846      path="$MSVC_DLL"
53847      has_space=`$ECHO "$path" | $GREP " "`
53848      if test "x$has_space" != x; then
53849        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53850$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53851        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53852      fi
53853
53854      # Use eval to expand a potential ~
53855      eval path="$path"
53856      if test ! -f "$path" && test ! -d "$path"; then
53857        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53858      fi
53859
53860      if test -d "$path"; then
53861        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53862      else
53863        dir="`$DIRNAME "$path"`"
53864        base="`$BASENAME "$path"`"
53865        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53866      fi
53867    fi
53868  fi
53869
53870      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53871$as_echo_n "checking for $DLL_NAME... " >&6; }
53872      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53873$as_echo "$MSVC_DLL" >&6; }
53874    else
53875      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53876$as_echo "incorrect, ignoring" >&6; }
53877      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53878$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53879    fi
53880  fi
53881
53882  fi
53883
53884  if test "x$MSVC_DLL" = x; then
53885    # Probe: Look in the Windows system32 directory
53886    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
53887
53888  windows_path="$CYGWIN_SYSTEMROOT"
53889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53890    unix_path=`$CYGPATH -u "$windows_path"`
53891    CYGWIN_SYSTEMROOT="$unix_path"
53892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53893    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53894    CYGWIN_SYSTEMROOT="$unix_path"
53895  fi
53896
53897    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
53898
53899  DLL_NAME="$DLL_NAME"
53900  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53901  METHOD="well-known location in SYSTEMROOT"
53902  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53903    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53904$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53905
53906    # Need to check if the found msvcr is correct architecture
53907    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53908$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53909    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53910    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53911      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53912      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53913      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53914        CORRECT_MSVCR_ARCH="PE32 executable"
53915      else
53916        CORRECT_MSVCR_ARCH="PE32+ executable"
53917      fi
53918    else
53919      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53920        CORRECT_MSVCR_ARCH=386
53921      else
53922        CORRECT_MSVCR_ARCH=x86-64
53923      fi
53924    fi
53925    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53926      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53927$as_echo "ok" >&6; }
53928      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53929
53930  # Only process if variable expands to non-empty
53931
53932  if test "x$MSVC_DLL" != x; then
53933    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53934
53935  # Input might be given as Windows format, start by converting to
53936  # unix format.
53937  path="$MSVC_DLL"
53938  new_path=`$CYGPATH -u "$path"`
53939
53940  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53941  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53942  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53943  # "foo.exe" is OK but "foo" is an error.
53944  #
53945  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53946  # It is also a way to make sure we got the proper file name for the real test later on.
53947  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53948  if test "x$test_shortpath" = x; then
53949    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53950$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53951    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53952  fi
53953
53954  # Call helper function which possibly converts this using DOS-style short mode.
53955  # If so, the updated path is stored in $new_path.
53956
53957  input_path="$new_path"
53958  # Check if we need to convert this using DOS-style short mode. If the path
53959  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53960  # take no chances and rewrite it.
53961  # Note: m4 eats our [], so we need to use [ and ] instead.
53962  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53963  if test "x$has_forbidden_chars" != x; then
53964    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53965    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53966    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53967    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53968      # Going to short mode and back again did indeed matter. Since short mode is
53969      # case insensitive, let's make it lowercase to improve readability.
53970      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53971      # Now convert it back to Unix-style (cygpath)
53972      input_path=`$CYGPATH -u "$shortmode_path"`
53973      new_path="$input_path"
53974    fi
53975  fi
53976
53977  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53978  if test "x$test_cygdrive_prefix" = x; then
53979    # As a simple fix, exclude /usr/bin since it's not a real path.
53980    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53981      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53982      # a path prefixed by /cygdrive for fixpath to work.
53983      new_path="$CYGWIN_ROOT_PATH$input_path"
53984    fi
53985  fi
53986
53987
53988  if test "x$path" != "x$new_path"; then
53989    MSVC_DLL="$new_path"
53990    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53991$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53992  fi
53993
53994    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53995
53996  path="$MSVC_DLL"
53997  has_colon=`$ECHO $path | $GREP ^.:`
53998  new_path="$path"
53999  if test "x$has_colon" = x; then
54000    # Not in mixed or Windows style, start by that.
54001    new_path=`cmd //c echo $path`
54002  fi
54003
54004
54005  input_path="$new_path"
54006  # Check if we need to convert this using DOS-style short mode. If the path
54007  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54008  # take no chances and rewrite it.
54009  # Note: m4 eats our [], so we need to use [ and ] instead.
54010  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54011  if test "x$has_forbidden_chars" != x; then
54012    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54013    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54014  fi
54015
54016
54017  windows_path="$new_path"
54018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54019    unix_path=`$CYGPATH -u "$windows_path"`
54020    new_path="$unix_path"
54021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54023    new_path="$unix_path"
54024  fi
54025
54026  if test "x$path" != "x$new_path"; then
54027    MSVC_DLL="$new_path"
54028    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54029$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54030  fi
54031
54032  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54033  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54034
54035    else
54036      # We're on a unix platform. Hooray! :)
54037      path="$MSVC_DLL"
54038      has_space=`$ECHO "$path" | $GREP " "`
54039      if test "x$has_space" != x; then
54040        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54041$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54042        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54043      fi
54044
54045      # Use eval to expand a potential ~
54046      eval path="$path"
54047      if test ! -f "$path" && test ! -d "$path"; then
54048        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54049      fi
54050
54051      if test -d "$path"; then
54052        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54053      else
54054        dir="`$DIRNAME "$path"`"
54055        base="`$BASENAME "$path"`"
54056        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54057      fi
54058    fi
54059  fi
54060
54061      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54062$as_echo_n "checking for $DLL_NAME... " >&6; }
54063      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54064$as_echo "$MSVC_DLL" >&6; }
54065    else
54066      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54067$as_echo "incorrect, ignoring" >&6; }
54068      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54069$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54070    fi
54071  fi
54072
54073  fi
54074
54075  if test "x$MSVC_DLL" = x; then
54076    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54077    if test "x$VS100COMNTOOLS" != x; then
54078      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54079
54080  windows_path="$CYGWIN_VS_TOOLS_DIR"
54081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54082    unix_path=`$CYGPATH -u "$windows_path"`
54083    CYGWIN_VS_TOOLS_DIR="$unix_path"
54084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54085    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54086    CYGWIN_VS_TOOLS_DIR="$unix_path"
54087  fi
54088
54089      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54090        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54091	    | $GREP -i /x64/ | $HEAD --lines 1`
54092      else
54093        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54094	    | $GREP -i /x86/ | $HEAD --lines 1`
54095      fi
54096
54097  DLL_NAME="$DLL_NAME"
54098  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54099  METHOD="search of VS100COMNTOOLS"
54100  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54101    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54102$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54103
54104    # Need to check if the found msvcr is correct architecture
54105    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54106$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54107    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54108    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54109      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54110      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54111      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54112        CORRECT_MSVCR_ARCH="PE32 executable"
54113      else
54114        CORRECT_MSVCR_ARCH="PE32+ executable"
54115      fi
54116    else
54117      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54118        CORRECT_MSVCR_ARCH=386
54119      else
54120        CORRECT_MSVCR_ARCH=x86-64
54121      fi
54122    fi
54123    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54124      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54125$as_echo "ok" >&6; }
54126      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54127
54128  # Only process if variable expands to non-empty
54129
54130  if test "x$MSVC_DLL" != x; then
54131    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54132
54133  # Input might be given as Windows format, start by converting to
54134  # unix format.
54135  path="$MSVC_DLL"
54136  new_path=`$CYGPATH -u "$path"`
54137
54138  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54139  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54140  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54141  # "foo.exe" is OK but "foo" is an error.
54142  #
54143  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54144  # It is also a way to make sure we got the proper file name for the real test later on.
54145  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54146  if test "x$test_shortpath" = x; then
54147    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54148$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54149    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54150  fi
54151
54152  # Call helper function which possibly converts this using DOS-style short mode.
54153  # If so, the updated path is stored in $new_path.
54154
54155  input_path="$new_path"
54156  # Check if we need to convert this using DOS-style short mode. If the path
54157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54158  # take no chances and rewrite it.
54159  # Note: m4 eats our [], so we need to use [ and ] instead.
54160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54161  if test "x$has_forbidden_chars" != x; then
54162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54163    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54164    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54165    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54166      # Going to short mode and back again did indeed matter. Since short mode is
54167      # case insensitive, let's make it lowercase to improve readability.
54168      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54169      # Now convert it back to Unix-style (cygpath)
54170      input_path=`$CYGPATH -u "$shortmode_path"`
54171      new_path="$input_path"
54172    fi
54173  fi
54174
54175  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54176  if test "x$test_cygdrive_prefix" = x; then
54177    # As a simple fix, exclude /usr/bin since it's not a real path.
54178    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54179      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54180      # a path prefixed by /cygdrive for fixpath to work.
54181      new_path="$CYGWIN_ROOT_PATH$input_path"
54182    fi
54183  fi
54184
54185
54186  if test "x$path" != "x$new_path"; then
54187    MSVC_DLL="$new_path"
54188    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54189$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54190  fi
54191
54192    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54193
54194  path="$MSVC_DLL"
54195  has_colon=`$ECHO $path | $GREP ^.:`
54196  new_path="$path"
54197  if test "x$has_colon" = x; then
54198    # Not in mixed or Windows style, start by that.
54199    new_path=`cmd //c echo $path`
54200  fi
54201
54202
54203  input_path="$new_path"
54204  # Check if we need to convert this using DOS-style short mode. If the path
54205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54206  # take no chances and rewrite it.
54207  # Note: m4 eats our [], so we need to use [ and ] instead.
54208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54209  if test "x$has_forbidden_chars" != x; then
54210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54211    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54212  fi
54213
54214
54215  windows_path="$new_path"
54216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54217    unix_path=`$CYGPATH -u "$windows_path"`
54218    new_path="$unix_path"
54219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54221    new_path="$unix_path"
54222  fi
54223
54224  if test "x$path" != "x$new_path"; then
54225    MSVC_DLL="$new_path"
54226    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54227$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54228  fi
54229
54230  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54231  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54232
54233    else
54234      # We're on a unix platform. Hooray! :)
54235      path="$MSVC_DLL"
54236      has_space=`$ECHO "$path" | $GREP " "`
54237      if test "x$has_space" != x; then
54238        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54239$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54240        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54241      fi
54242
54243      # Use eval to expand a potential ~
54244      eval path="$path"
54245      if test ! -f "$path" && test ! -d "$path"; then
54246        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54247      fi
54248
54249      if test -d "$path"; then
54250        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54251      else
54252        dir="`$DIRNAME "$path"`"
54253        base="`$BASENAME "$path"`"
54254        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54255      fi
54256    fi
54257  fi
54258
54259      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54260$as_echo_n "checking for $DLL_NAME... " >&6; }
54261      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54262$as_echo "$MSVC_DLL" >&6; }
54263    else
54264      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54265$as_echo "incorrect, ignoring" >&6; }
54266      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54267$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54268    fi
54269  fi
54270
54271    fi
54272  fi
54273
54274  if test "x$MSVC_DLL" = x; then
54275    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54276    # (This was the original behaviour; kept since it might turn something up)
54277    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54278      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54279        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54280	    | $GREP x64 | $HEAD --lines 1`
54281      else
54282        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54283	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54284        if test "x$POSSIBLE_MSVC_DLL" = x; then
54285          # We're grasping at straws now...
54286          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54287	      | $HEAD --lines 1`
54288        fi
54289      fi
54290
54291
54292  DLL_NAME="$DLL_NAME"
54293  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54294  METHOD="search of VCINSTALLDIR"
54295  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54296    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54297$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54298
54299    # Need to check if the found msvcr is correct architecture
54300    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54301$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54302    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54303    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54304      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54305      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54306      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54307        CORRECT_MSVCR_ARCH="PE32 executable"
54308      else
54309        CORRECT_MSVCR_ARCH="PE32+ executable"
54310      fi
54311    else
54312      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54313        CORRECT_MSVCR_ARCH=386
54314      else
54315        CORRECT_MSVCR_ARCH=x86-64
54316      fi
54317    fi
54318    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54319      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54320$as_echo "ok" >&6; }
54321      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54322
54323  # Only process if variable expands to non-empty
54324
54325  if test "x$MSVC_DLL" != x; then
54326    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54327
54328  # Input might be given as Windows format, start by converting to
54329  # unix format.
54330  path="$MSVC_DLL"
54331  new_path=`$CYGPATH -u "$path"`
54332
54333  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54334  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54335  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54336  # "foo.exe" is OK but "foo" is an error.
54337  #
54338  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54339  # It is also a way to make sure we got the proper file name for the real test later on.
54340  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54341  if test "x$test_shortpath" = x; then
54342    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54343$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54344    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54345  fi
54346
54347  # Call helper function which possibly converts this using DOS-style short mode.
54348  # If so, the updated path is stored in $new_path.
54349
54350  input_path="$new_path"
54351  # Check if we need to convert this using DOS-style short mode. If the path
54352  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54353  # take no chances and rewrite it.
54354  # Note: m4 eats our [], so we need to use [ and ] instead.
54355  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54356  if test "x$has_forbidden_chars" != x; then
54357    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54358    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54359    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54360    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54361      # Going to short mode and back again did indeed matter. Since short mode is
54362      # case insensitive, let's make it lowercase to improve readability.
54363      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54364      # Now convert it back to Unix-style (cygpath)
54365      input_path=`$CYGPATH -u "$shortmode_path"`
54366      new_path="$input_path"
54367    fi
54368  fi
54369
54370  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54371  if test "x$test_cygdrive_prefix" = x; then
54372    # As a simple fix, exclude /usr/bin since it's not a real path.
54373    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54374      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54375      # a path prefixed by /cygdrive for fixpath to work.
54376      new_path="$CYGWIN_ROOT_PATH$input_path"
54377    fi
54378  fi
54379
54380
54381  if test "x$path" != "x$new_path"; then
54382    MSVC_DLL="$new_path"
54383    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54384$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54385  fi
54386
54387    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54388
54389  path="$MSVC_DLL"
54390  has_colon=`$ECHO $path | $GREP ^.:`
54391  new_path="$path"
54392  if test "x$has_colon" = x; then
54393    # Not in mixed or Windows style, start by that.
54394    new_path=`cmd //c echo $path`
54395  fi
54396
54397
54398  input_path="$new_path"
54399  # Check if we need to convert this using DOS-style short mode. If the path
54400  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54401  # take no chances and rewrite it.
54402  # Note: m4 eats our [], so we need to use [ and ] instead.
54403  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54404  if test "x$has_forbidden_chars" != x; then
54405    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54406    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54407  fi
54408
54409
54410  windows_path="$new_path"
54411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54412    unix_path=`$CYGPATH -u "$windows_path"`
54413    new_path="$unix_path"
54414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54416    new_path="$unix_path"
54417  fi
54418
54419  if test "x$path" != "x$new_path"; then
54420    MSVC_DLL="$new_path"
54421    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54422$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54423  fi
54424
54425  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54426  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54427
54428    else
54429      # We're on a unix platform. Hooray! :)
54430      path="$MSVC_DLL"
54431      has_space=`$ECHO "$path" | $GREP " "`
54432      if test "x$has_space" != x; then
54433        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54434$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54435        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54436      fi
54437
54438      # Use eval to expand a potential ~
54439      eval path="$path"
54440      if test ! -f "$path" && test ! -d "$path"; then
54441        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54442      fi
54443
54444      if test -d "$path"; then
54445        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54446      else
54447        dir="`$DIRNAME "$path"`"
54448        base="`$BASENAME "$path"`"
54449        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54450      fi
54451    fi
54452  fi
54453
54454      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54455$as_echo_n "checking for $DLL_NAME... " >&6; }
54456      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54457$as_echo "$MSVC_DLL" >&6; }
54458    else
54459      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54460$as_echo "incorrect, ignoring" >&6; }
54461      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54462$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54463    fi
54464  fi
54465
54466    fi
54467  fi
54468
54469  if test "x$MSVC_DLL" = x; then
54470    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54471$as_echo_n "checking for $DLL_NAME... " >&6; }
54472    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54473$as_echo "no" >&6; }
54474    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54475  fi
54476
54477    MSVCR_DLL="$MSVC_DLL"
54478  fi
54479
54480
54481
54482# Check whether --with-msvcp-dll was given.
54483if test "${with_msvcp_dll+set}" = set; then :
54484  withval=$with_msvcp_dll;
54485fi
54486
54487
54488  if test "x$MSVCP_NAME" != "x"; then
54489    if test "x$with_msvcp_dll" != x; then
54490      # If given explicitely by user, do not probe. If not present, fail directly.
54491
54492  DLL_NAME="$MSVCP_NAME"
54493  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54494  METHOD="--with-msvcp-dll"
54495  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54496    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54497$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54498
54499    # Need to check if the found msvcr is correct architecture
54500    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54501$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54502    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54503    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54504      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54505      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54506      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54507        CORRECT_MSVCR_ARCH="PE32 executable"
54508      else
54509        CORRECT_MSVCR_ARCH="PE32+ executable"
54510      fi
54511    else
54512      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54513        CORRECT_MSVCR_ARCH=386
54514      else
54515        CORRECT_MSVCR_ARCH=x86-64
54516      fi
54517    fi
54518    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54519      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54520$as_echo "ok" >&6; }
54521      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54522
54523  # Only process if variable expands to non-empty
54524
54525  if test "x$MSVC_DLL" != x; then
54526    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54527
54528  # Input might be given as Windows format, start by converting to
54529  # unix format.
54530  path="$MSVC_DLL"
54531  new_path=`$CYGPATH -u "$path"`
54532
54533  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54534  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54535  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54536  # "foo.exe" is OK but "foo" is an error.
54537  #
54538  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54539  # It is also a way to make sure we got the proper file name for the real test later on.
54540  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54541  if test "x$test_shortpath" = x; then
54542    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54543$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54544    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54545  fi
54546
54547  # Call helper function which possibly converts this using DOS-style short mode.
54548  # If so, the updated path is stored in $new_path.
54549
54550  input_path="$new_path"
54551  # Check if we need to convert this using DOS-style short mode. If the path
54552  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54553  # take no chances and rewrite it.
54554  # Note: m4 eats our [], so we need to use [ and ] instead.
54555  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54556  if test "x$has_forbidden_chars" != x; then
54557    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54558    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54559    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54560    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54561      # Going to short mode and back again did indeed matter. Since short mode is
54562      # case insensitive, let's make it lowercase to improve readability.
54563      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54564      # Now convert it back to Unix-style (cygpath)
54565      input_path=`$CYGPATH -u "$shortmode_path"`
54566      new_path="$input_path"
54567    fi
54568  fi
54569
54570  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54571  if test "x$test_cygdrive_prefix" = x; then
54572    # As a simple fix, exclude /usr/bin since it's not a real path.
54573    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54574      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54575      # a path prefixed by /cygdrive for fixpath to work.
54576      new_path="$CYGWIN_ROOT_PATH$input_path"
54577    fi
54578  fi
54579
54580
54581  if test "x$path" != "x$new_path"; then
54582    MSVC_DLL="$new_path"
54583    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54584$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54585  fi
54586
54587    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54588
54589  path="$MSVC_DLL"
54590  has_colon=`$ECHO $path | $GREP ^.:`
54591  new_path="$path"
54592  if test "x$has_colon" = x; then
54593    # Not in mixed or Windows style, start by that.
54594    new_path=`cmd //c echo $path`
54595  fi
54596
54597
54598  input_path="$new_path"
54599  # Check if we need to convert this using DOS-style short mode. If the path
54600  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54601  # take no chances and rewrite it.
54602  # Note: m4 eats our [], so we need to use [ and ] instead.
54603  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54604  if test "x$has_forbidden_chars" != x; then
54605    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54606    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54607  fi
54608
54609
54610  windows_path="$new_path"
54611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54612    unix_path=`$CYGPATH -u "$windows_path"`
54613    new_path="$unix_path"
54614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54615    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54616    new_path="$unix_path"
54617  fi
54618
54619  if test "x$path" != "x$new_path"; then
54620    MSVC_DLL="$new_path"
54621    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54622$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54623  fi
54624
54625  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54626  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54627
54628    else
54629      # We're on a unix platform. Hooray! :)
54630      path="$MSVC_DLL"
54631      has_space=`$ECHO "$path" | $GREP " "`
54632      if test "x$has_space" != x; then
54633        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54634$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54635        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54636      fi
54637
54638      # Use eval to expand a potential ~
54639      eval path="$path"
54640      if test ! -f "$path" && test ! -d "$path"; then
54641        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54642      fi
54643
54644      if test -d "$path"; then
54645        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54646      else
54647        dir="`$DIRNAME "$path"`"
54648        base="`$BASENAME "$path"`"
54649        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54650      fi
54651    fi
54652  fi
54653
54654      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54655$as_echo_n "checking for $DLL_NAME... " >&6; }
54656      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54657$as_echo "$MSVC_DLL" >&6; }
54658    else
54659      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54660$as_echo "incorrect, ignoring" >&6; }
54661      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54662$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54663    fi
54664  fi
54665
54666      if test "x$MSVC_DLL" = x; then
54667        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54668      fi
54669      MSVCP_DLL="$MSVC_DLL"
54670    elif test "x$DEVKIT_MSVCP_DLL" != x; then
54671
54672  DLL_NAME="$MSVCP_NAME"
54673  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54674  METHOD="devkit"
54675  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54676    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54677$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54678
54679    # Need to check if the found msvcr is correct architecture
54680    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54681$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54682    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54683    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54684      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54685      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54686      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54687        CORRECT_MSVCR_ARCH="PE32 executable"
54688      else
54689        CORRECT_MSVCR_ARCH="PE32+ executable"
54690      fi
54691    else
54692      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54693        CORRECT_MSVCR_ARCH=386
54694      else
54695        CORRECT_MSVCR_ARCH=x86-64
54696      fi
54697    fi
54698    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54699      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54700$as_echo "ok" >&6; }
54701      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54702
54703  # Only process if variable expands to non-empty
54704
54705  if test "x$MSVC_DLL" != x; then
54706    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54707
54708  # Input might be given as Windows format, start by converting to
54709  # unix format.
54710  path="$MSVC_DLL"
54711  new_path=`$CYGPATH -u "$path"`
54712
54713  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54714  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54715  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54716  # "foo.exe" is OK but "foo" is an error.
54717  #
54718  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54719  # It is also a way to make sure we got the proper file name for the real test later on.
54720  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54721  if test "x$test_shortpath" = x; then
54722    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54723$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54724    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54725  fi
54726
54727  # Call helper function which possibly converts this using DOS-style short mode.
54728  # If so, the updated path is stored in $new_path.
54729
54730  input_path="$new_path"
54731  # Check if we need to convert this using DOS-style short mode. If the path
54732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54733  # take no chances and rewrite it.
54734  # Note: m4 eats our [], so we need to use [ and ] instead.
54735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54736  if test "x$has_forbidden_chars" != x; then
54737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54738    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54739    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54740    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54741      # Going to short mode and back again did indeed matter. Since short mode is
54742      # case insensitive, let's make it lowercase to improve readability.
54743      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54744      # Now convert it back to Unix-style (cygpath)
54745      input_path=`$CYGPATH -u "$shortmode_path"`
54746      new_path="$input_path"
54747    fi
54748  fi
54749
54750  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54751  if test "x$test_cygdrive_prefix" = x; then
54752    # As a simple fix, exclude /usr/bin since it's not a real path.
54753    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54754      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54755      # a path prefixed by /cygdrive for fixpath to work.
54756      new_path="$CYGWIN_ROOT_PATH$input_path"
54757    fi
54758  fi
54759
54760
54761  if test "x$path" != "x$new_path"; then
54762    MSVC_DLL="$new_path"
54763    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54764$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54765  fi
54766
54767    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54768
54769  path="$MSVC_DLL"
54770  has_colon=`$ECHO $path | $GREP ^.:`
54771  new_path="$path"
54772  if test "x$has_colon" = x; then
54773    # Not in mixed or Windows style, start by that.
54774    new_path=`cmd //c echo $path`
54775  fi
54776
54777
54778  input_path="$new_path"
54779  # Check if we need to convert this using DOS-style short mode. If the path
54780  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54781  # take no chances and rewrite it.
54782  # Note: m4 eats our [], so we need to use [ and ] instead.
54783  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54784  if test "x$has_forbidden_chars" != x; then
54785    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54786    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54787  fi
54788
54789
54790  windows_path="$new_path"
54791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54792    unix_path=`$CYGPATH -u "$windows_path"`
54793    new_path="$unix_path"
54794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54795    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54796    new_path="$unix_path"
54797  fi
54798
54799  if test "x$path" != "x$new_path"; then
54800    MSVC_DLL="$new_path"
54801    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54802$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54803  fi
54804
54805  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54806  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54807
54808    else
54809      # We're on a unix platform. Hooray! :)
54810      path="$MSVC_DLL"
54811      has_space=`$ECHO "$path" | $GREP " "`
54812      if test "x$has_space" != x; then
54813        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54814$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54815        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54816      fi
54817
54818      # Use eval to expand a potential ~
54819      eval path="$path"
54820      if test ! -f "$path" && test ! -d "$path"; then
54821        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54822      fi
54823
54824      if test -d "$path"; then
54825        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54826      else
54827        dir="`$DIRNAME "$path"`"
54828        base="`$BASENAME "$path"`"
54829        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54830      fi
54831    fi
54832  fi
54833
54834      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54835$as_echo_n "checking for $DLL_NAME... " >&6; }
54836      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54837$as_echo "$MSVC_DLL" >&6; }
54838    else
54839      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54840$as_echo "incorrect, ignoring" >&6; }
54841      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54842$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54843    fi
54844  fi
54845
54846      if test "x$MSVC_DLL" = x; then
54847        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54848      fi
54849      MSVCP_DLL="$MSVC_DLL"
54850    else
54851
54852  DLL_NAME="${MSVCP_NAME}"
54853  MSVC_DLL=
54854
54855  if test "x$MSVC_DLL" = x; then
54856    # Probe: Using well-known location from Visual Studio 10.0
54857    if test "x$VCINSTALLDIR" != x; then
54858      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54859
54860  windows_path="$CYGWIN_VC_INSTALL_DIR"
54861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54862    unix_path=`$CYGPATH -u "$windows_path"`
54863    CYGWIN_VC_INSTALL_DIR="$unix_path"
54864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54866    CYGWIN_VC_INSTALL_DIR="$unix_path"
54867  fi
54868
54869      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54870        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54871      else
54872        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54873      fi
54874      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54875
54876  DLL_NAME="$DLL_NAME"
54877  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54878  METHOD="well-known location in VCINSTALLDIR"
54879  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54880    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54881$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54882
54883    # Need to check if the found msvcr is correct architecture
54884    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54885$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54886    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54887    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54888      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54889      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54890      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54891        CORRECT_MSVCR_ARCH="PE32 executable"
54892      else
54893        CORRECT_MSVCR_ARCH="PE32+ executable"
54894      fi
54895    else
54896      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54897        CORRECT_MSVCR_ARCH=386
54898      else
54899        CORRECT_MSVCR_ARCH=x86-64
54900      fi
54901    fi
54902    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54903      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54904$as_echo "ok" >&6; }
54905      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54906
54907  # Only process if variable expands to non-empty
54908
54909  if test "x$MSVC_DLL" != x; then
54910    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54911
54912  # Input might be given as Windows format, start by converting to
54913  # unix format.
54914  path="$MSVC_DLL"
54915  new_path=`$CYGPATH -u "$path"`
54916
54917  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54918  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54919  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54920  # "foo.exe" is OK but "foo" is an error.
54921  #
54922  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54923  # It is also a way to make sure we got the proper file name for the real test later on.
54924  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54925  if test "x$test_shortpath" = x; then
54926    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54927$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54928    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54929  fi
54930
54931  # Call helper function which possibly converts this using DOS-style short mode.
54932  # If so, the updated path is stored in $new_path.
54933
54934  input_path="$new_path"
54935  # Check if we need to convert this using DOS-style short mode. If the path
54936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54937  # take no chances and rewrite it.
54938  # Note: m4 eats our [], so we need to use [ and ] instead.
54939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54940  if test "x$has_forbidden_chars" != x; then
54941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54942    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54943    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54944    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54945      # Going to short mode and back again did indeed matter. Since short mode is
54946      # case insensitive, let's make it lowercase to improve readability.
54947      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54948      # Now convert it back to Unix-style (cygpath)
54949      input_path=`$CYGPATH -u "$shortmode_path"`
54950      new_path="$input_path"
54951    fi
54952  fi
54953
54954  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54955  if test "x$test_cygdrive_prefix" = x; then
54956    # As a simple fix, exclude /usr/bin since it's not a real path.
54957    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54958      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54959      # a path prefixed by /cygdrive for fixpath to work.
54960      new_path="$CYGWIN_ROOT_PATH$input_path"
54961    fi
54962  fi
54963
54964
54965  if test "x$path" != "x$new_path"; then
54966    MSVC_DLL="$new_path"
54967    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54968$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54969  fi
54970
54971    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54972
54973  path="$MSVC_DLL"
54974  has_colon=`$ECHO $path | $GREP ^.:`
54975  new_path="$path"
54976  if test "x$has_colon" = x; then
54977    # Not in mixed or Windows style, start by that.
54978    new_path=`cmd //c echo $path`
54979  fi
54980
54981
54982  input_path="$new_path"
54983  # Check if we need to convert this using DOS-style short mode. If the path
54984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54985  # take no chances and rewrite it.
54986  # Note: m4 eats our [], so we need to use [ and ] instead.
54987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54988  if test "x$has_forbidden_chars" != x; then
54989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54990    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54991  fi
54992
54993
54994  windows_path="$new_path"
54995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54996    unix_path=`$CYGPATH -u "$windows_path"`
54997    new_path="$unix_path"
54998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54999    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55000    new_path="$unix_path"
55001  fi
55002
55003  if test "x$path" != "x$new_path"; then
55004    MSVC_DLL="$new_path"
55005    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55006$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55007  fi
55008
55009  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55010  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55011
55012    else
55013      # We're on a unix platform. Hooray! :)
55014      path="$MSVC_DLL"
55015      has_space=`$ECHO "$path" | $GREP " "`
55016      if test "x$has_space" != x; then
55017        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55018$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55019        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55020      fi
55021
55022      # Use eval to expand a potential ~
55023      eval path="$path"
55024      if test ! -f "$path" && test ! -d "$path"; then
55025        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55026      fi
55027
55028      if test -d "$path"; then
55029        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55030      else
55031        dir="`$DIRNAME "$path"`"
55032        base="`$BASENAME "$path"`"
55033        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55034      fi
55035    fi
55036  fi
55037
55038      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55039$as_echo_n "checking for $DLL_NAME... " >&6; }
55040      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55041$as_echo "$MSVC_DLL" >&6; }
55042    else
55043      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55044$as_echo "incorrect, ignoring" >&6; }
55045      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55046$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55047    fi
55048  fi
55049
55050    fi
55051  fi
55052
55053  if test "x$MSVC_DLL" = x; then
55054    # Probe: Check in the Boot JDK directory.
55055    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55056
55057  DLL_NAME="$DLL_NAME"
55058  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55059  METHOD="well-known location in Boot JDK"
55060  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55061    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55062$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55063
55064    # Need to check if the found msvcr is correct architecture
55065    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55066$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55067    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55068    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55069      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55070      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55071      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55072        CORRECT_MSVCR_ARCH="PE32 executable"
55073      else
55074        CORRECT_MSVCR_ARCH="PE32+ executable"
55075      fi
55076    else
55077      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55078        CORRECT_MSVCR_ARCH=386
55079      else
55080        CORRECT_MSVCR_ARCH=x86-64
55081      fi
55082    fi
55083    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55084      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55085$as_echo "ok" >&6; }
55086      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55087
55088  # Only process if variable expands to non-empty
55089
55090  if test "x$MSVC_DLL" != x; then
55091    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55092
55093  # Input might be given as Windows format, start by converting to
55094  # unix format.
55095  path="$MSVC_DLL"
55096  new_path=`$CYGPATH -u "$path"`
55097
55098  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55099  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55100  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55101  # "foo.exe" is OK but "foo" is an error.
55102  #
55103  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55104  # It is also a way to make sure we got the proper file name for the real test later on.
55105  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55106  if test "x$test_shortpath" = x; then
55107    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55108$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55109    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55110  fi
55111
55112  # Call helper function which possibly converts this using DOS-style short mode.
55113  # If so, the updated path is stored in $new_path.
55114
55115  input_path="$new_path"
55116  # Check if we need to convert this using DOS-style short mode. If the path
55117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55118  # take no chances and rewrite it.
55119  # Note: m4 eats our [], so we need to use [ and ] instead.
55120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55121  if test "x$has_forbidden_chars" != x; then
55122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55123    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55124    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55125    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55126      # Going to short mode and back again did indeed matter. Since short mode is
55127      # case insensitive, let's make it lowercase to improve readability.
55128      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55129      # Now convert it back to Unix-style (cygpath)
55130      input_path=`$CYGPATH -u "$shortmode_path"`
55131      new_path="$input_path"
55132    fi
55133  fi
55134
55135  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55136  if test "x$test_cygdrive_prefix" = x; then
55137    # As a simple fix, exclude /usr/bin since it's not a real path.
55138    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55139      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55140      # a path prefixed by /cygdrive for fixpath to work.
55141      new_path="$CYGWIN_ROOT_PATH$input_path"
55142    fi
55143  fi
55144
55145
55146  if test "x$path" != "x$new_path"; then
55147    MSVC_DLL="$new_path"
55148    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55149$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55150  fi
55151
55152    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55153
55154  path="$MSVC_DLL"
55155  has_colon=`$ECHO $path | $GREP ^.:`
55156  new_path="$path"
55157  if test "x$has_colon" = x; then
55158    # Not in mixed or Windows style, start by that.
55159    new_path=`cmd //c echo $path`
55160  fi
55161
55162
55163  input_path="$new_path"
55164  # Check if we need to convert this using DOS-style short mode. If the path
55165  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55166  # take no chances and rewrite it.
55167  # Note: m4 eats our [], so we need to use [ and ] instead.
55168  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55169  if test "x$has_forbidden_chars" != x; then
55170    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55171    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55172  fi
55173
55174
55175  windows_path="$new_path"
55176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55177    unix_path=`$CYGPATH -u "$windows_path"`
55178    new_path="$unix_path"
55179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55180    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55181    new_path="$unix_path"
55182  fi
55183
55184  if test "x$path" != "x$new_path"; then
55185    MSVC_DLL="$new_path"
55186    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55187$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55188  fi
55189
55190  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55191  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55192
55193    else
55194      # We're on a unix platform. Hooray! :)
55195      path="$MSVC_DLL"
55196      has_space=`$ECHO "$path" | $GREP " "`
55197      if test "x$has_space" != x; then
55198        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55199$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55200        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55201      fi
55202
55203      # Use eval to expand a potential ~
55204      eval path="$path"
55205      if test ! -f "$path" && test ! -d "$path"; then
55206        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55207      fi
55208
55209      if test -d "$path"; then
55210        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55211      else
55212        dir="`$DIRNAME "$path"`"
55213        base="`$BASENAME "$path"`"
55214        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55215      fi
55216    fi
55217  fi
55218
55219      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55220$as_echo_n "checking for $DLL_NAME... " >&6; }
55221      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55222$as_echo "$MSVC_DLL" >&6; }
55223    else
55224      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55225$as_echo "incorrect, ignoring" >&6; }
55226      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55227$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55228    fi
55229  fi
55230
55231  fi
55232
55233  if test "x$MSVC_DLL" = x; then
55234    # Probe: Look in the Windows system32 directory
55235    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55236
55237  windows_path="$CYGWIN_SYSTEMROOT"
55238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55239    unix_path=`$CYGPATH -u "$windows_path"`
55240    CYGWIN_SYSTEMROOT="$unix_path"
55241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55243    CYGWIN_SYSTEMROOT="$unix_path"
55244  fi
55245
55246    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55247
55248  DLL_NAME="$DLL_NAME"
55249  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55250  METHOD="well-known location in SYSTEMROOT"
55251  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55252    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55253$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55254
55255    # Need to check if the found msvcr is correct architecture
55256    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55257$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55258    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55259    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55260      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55261      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55262      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55263        CORRECT_MSVCR_ARCH="PE32 executable"
55264      else
55265        CORRECT_MSVCR_ARCH="PE32+ executable"
55266      fi
55267    else
55268      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55269        CORRECT_MSVCR_ARCH=386
55270      else
55271        CORRECT_MSVCR_ARCH=x86-64
55272      fi
55273    fi
55274    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55275      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55276$as_echo "ok" >&6; }
55277      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55278
55279  # Only process if variable expands to non-empty
55280
55281  if test "x$MSVC_DLL" != x; then
55282    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55283
55284  # Input might be given as Windows format, start by converting to
55285  # unix format.
55286  path="$MSVC_DLL"
55287  new_path=`$CYGPATH -u "$path"`
55288
55289  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55290  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55291  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55292  # "foo.exe" is OK but "foo" is an error.
55293  #
55294  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55295  # It is also a way to make sure we got the proper file name for the real test later on.
55296  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55297  if test "x$test_shortpath" = x; then
55298    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55299$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55300    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55301  fi
55302
55303  # Call helper function which possibly converts this using DOS-style short mode.
55304  # If so, the updated path is stored in $new_path.
55305
55306  input_path="$new_path"
55307  # Check if we need to convert this using DOS-style short mode. If the path
55308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55309  # take no chances and rewrite it.
55310  # Note: m4 eats our [], so we need to use [ and ] instead.
55311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55312  if test "x$has_forbidden_chars" != x; then
55313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55314    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55315    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55316    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55317      # Going to short mode and back again did indeed matter. Since short mode is
55318      # case insensitive, let's make it lowercase to improve readability.
55319      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55320      # Now convert it back to Unix-style (cygpath)
55321      input_path=`$CYGPATH -u "$shortmode_path"`
55322      new_path="$input_path"
55323    fi
55324  fi
55325
55326  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55327  if test "x$test_cygdrive_prefix" = x; then
55328    # As a simple fix, exclude /usr/bin since it's not a real path.
55329    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55330      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55331      # a path prefixed by /cygdrive for fixpath to work.
55332      new_path="$CYGWIN_ROOT_PATH$input_path"
55333    fi
55334  fi
55335
55336
55337  if test "x$path" != "x$new_path"; then
55338    MSVC_DLL="$new_path"
55339    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55340$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55341  fi
55342
55343    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55344
55345  path="$MSVC_DLL"
55346  has_colon=`$ECHO $path | $GREP ^.:`
55347  new_path="$path"
55348  if test "x$has_colon" = x; then
55349    # Not in mixed or Windows style, start by that.
55350    new_path=`cmd //c echo $path`
55351  fi
55352
55353
55354  input_path="$new_path"
55355  # Check if we need to convert this using DOS-style short mode. If the path
55356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55357  # take no chances and rewrite it.
55358  # Note: m4 eats our [], so we need to use [ and ] instead.
55359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55360  if test "x$has_forbidden_chars" != x; then
55361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55362    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55363  fi
55364
55365
55366  windows_path="$new_path"
55367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55368    unix_path=`$CYGPATH -u "$windows_path"`
55369    new_path="$unix_path"
55370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55372    new_path="$unix_path"
55373  fi
55374
55375  if test "x$path" != "x$new_path"; then
55376    MSVC_DLL="$new_path"
55377    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55378$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55379  fi
55380
55381  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55382  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55383
55384    else
55385      # We're on a unix platform. Hooray! :)
55386      path="$MSVC_DLL"
55387      has_space=`$ECHO "$path" | $GREP " "`
55388      if test "x$has_space" != x; then
55389        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55390$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55391        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55392      fi
55393
55394      # Use eval to expand a potential ~
55395      eval path="$path"
55396      if test ! -f "$path" && test ! -d "$path"; then
55397        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55398      fi
55399
55400      if test -d "$path"; then
55401        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55402      else
55403        dir="`$DIRNAME "$path"`"
55404        base="`$BASENAME "$path"`"
55405        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55406      fi
55407    fi
55408  fi
55409
55410      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55411$as_echo_n "checking for $DLL_NAME... " >&6; }
55412      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55413$as_echo "$MSVC_DLL" >&6; }
55414    else
55415      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55416$as_echo "incorrect, ignoring" >&6; }
55417      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55418$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55419    fi
55420  fi
55421
55422  fi
55423
55424  if test "x$MSVC_DLL" = x; then
55425    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55426    if test "x$VS100COMNTOOLS" != x; then
55427      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55428
55429  windows_path="$CYGWIN_VS_TOOLS_DIR"
55430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55431    unix_path=`$CYGPATH -u "$windows_path"`
55432    CYGWIN_VS_TOOLS_DIR="$unix_path"
55433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55435    CYGWIN_VS_TOOLS_DIR="$unix_path"
55436  fi
55437
55438      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55439        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55440	    | $GREP -i /x64/ | $HEAD --lines 1`
55441      else
55442        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55443	    | $GREP -i /x86/ | $HEAD --lines 1`
55444      fi
55445
55446  DLL_NAME="$DLL_NAME"
55447  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55448  METHOD="search of VS100COMNTOOLS"
55449  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55450    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55451$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55452
55453    # Need to check if the found msvcr is correct architecture
55454    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55455$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55456    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55457    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55458      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55459      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55460      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55461        CORRECT_MSVCR_ARCH="PE32 executable"
55462      else
55463        CORRECT_MSVCR_ARCH="PE32+ executable"
55464      fi
55465    else
55466      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55467        CORRECT_MSVCR_ARCH=386
55468      else
55469        CORRECT_MSVCR_ARCH=x86-64
55470      fi
55471    fi
55472    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55473      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55474$as_echo "ok" >&6; }
55475      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55476
55477  # Only process if variable expands to non-empty
55478
55479  if test "x$MSVC_DLL" != x; then
55480    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55481
55482  # Input might be given as Windows format, start by converting to
55483  # unix format.
55484  path="$MSVC_DLL"
55485  new_path=`$CYGPATH -u "$path"`
55486
55487  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55488  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55489  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55490  # "foo.exe" is OK but "foo" is an error.
55491  #
55492  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55493  # It is also a way to make sure we got the proper file name for the real test later on.
55494  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55495  if test "x$test_shortpath" = x; then
55496    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55497$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55498    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55499  fi
55500
55501  # Call helper function which possibly converts this using DOS-style short mode.
55502  # If so, the updated path is stored in $new_path.
55503
55504  input_path="$new_path"
55505  # Check if we need to convert this using DOS-style short mode. If the path
55506  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55507  # take no chances and rewrite it.
55508  # Note: m4 eats our [], so we need to use [ and ] instead.
55509  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55510  if test "x$has_forbidden_chars" != x; then
55511    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55512    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55513    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55514    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55515      # Going to short mode and back again did indeed matter. Since short mode is
55516      # case insensitive, let's make it lowercase to improve readability.
55517      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55518      # Now convert it back to Unix-style (cygpath)
55519      input_path=`$CYGPATH -u "$shortmode_path"`
55520      new_path="$input_path"
55521    fi
55522  fi
55523
55524  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55525  if test "x$test_cygdrive_prefix" = x; then
55526    # As a simple fix, exclude /usr/bin since it's not a real path.
55527    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55528      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55529      # a path prefixed by /cygdrive for fixpath to work.
55530      new_path="$CYGWIN_ROOT_PATH$input_path"
55531    fi
55532  fi
55533
55534
55535  if test "x$path" != "x$new_path"; then
55536    MSVC_DLL="$new_path"
55537    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55538$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55539  fi
55540
55541    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55542
55543  path="$MSVC_DLL"
55544  has_colon=`$ECHO $path | $GREP ^.:`
55545  new_path="$path"
55546  if test "x$has_colon" = x; then
55547    # Not in mixed or Windows style, start by that.
55548    new_path=`cmd //c echo $path`
55549  fi
55550
55551
55552  input_path="$new_path"
55553  # Check if we need to convert this using DOS-style short mode. If the path
55554  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55555  # take no chances and rewrite it.
55556  # Note: m4 eats our [], so we need to use [ and ] instead.
55557  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55558  if test "x$has_forbidden_chars" != x; then
55559    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55560    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55561  fi
55562
55563
55564  windows_path="$new_path"
55565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55566    unix_path=`$CYGPATH -u "$windows_path"`
55567    new_path="$unix_path"
55568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55570    new_path="$unix_path"
55571  fi
55572
55573  if test "x$path" != "x$new_path"; then
55574    MSVC_DLL="$new_path"
55575    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55576$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55577  fi
55578
55579  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55580  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55581
55582    else
55583      # We're on a unix platform. Hooray! :)
55584      path="$MSVC_DLL"
55585      has_space=`$ECHO "$path" | $GREP " "`
55586      if test "x$has_space" != x; then
55587        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55588$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55589        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55590      fi
55591
55592      # Use eval to expand a potential ~
55593      eval path="$path"
55594      if test ! -f "$path" && test ! -d "$path"; then
55595        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55596      fi
55597
55598      if test -d "$path"; then
55599        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55600      else
55601        dir="`$DIRNAME "$path"`"
55602        base="`$BASENAME "$path"`"
55603        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55604      fi
55605    fi
55606  fi
55607
55608      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55609$as_echo_n "checking for $DLL_NAME... " >&6; }
55610      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55611$as_echo "$MSVC_DLL" >&6; }
55612    else
55613      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55614$as_echo "incorrect, ignoring" >&6; }
55615      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55616$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55617    fi
55618  fi
55619
55620    fi
55621  fi
55622
55623  if test "x$MSVC_DLL" = x; then
55624    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55625    # (This was the original behaviour; kept since it might turn something up)
55626    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55627      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55628        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55629	    | $GREP x64 | $HEAD --lines 1`
55630      else
55631        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55632	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55633        if test "x$POSSIBLE_MSVC_DLL" = x; then
55634          # We're grasping at straws now...
55635          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55636	      | $HEAD --lines 1`
55637        fi
55638      fi
55639
55640
55641  DLL_NAME="$DLL_NAME"
55642  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55643  METHOD="search of VCINSTALLDIR"
55644  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55645    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55646$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55647
55648    # Need to check if the found msvcr is correct architecture
55649    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55650$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55651    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55652    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55653      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55654      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55655      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55656        CORRECT_MSVCR_ARCH="PE32 executable"
55657      else
55658        CORRECT_MSVCR_ARCH="PE32+ executable"
55659      fi
55660    else
55661      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55662        CORRECT_MSVCR_ARCH=386
55663      else
55664        CORRECT_MSVCR_ARCH=x86-64
55665      fi
55666    fi
55667    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55668      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55669$as_echo "ok" >&6; }
55670      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55671
55672  # Only process if variable expands to non-empty
55673
55674  if test "x$MSVC_DLL" != x; then
55675    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55676
55677  # Input might be given as Windows format, start by converting to
55678  # unix format.
55679  path="$MSVC_DLL"
55680  new_path=`$CYGPATH -u "$path"`
55681
55682  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55683  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55684  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55685  # "foo.exe" is OK but "foo" is an error.
55686  #
55687  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55688  # It is also a way to make sure we got the proper file name for the real test later on.
55689  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55690  if test "x$test_shortpath" = x; then
55691    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55692$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55693    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55694  fi
55695
55696  # Call helper function which possibly converts this using DOS-style short mode.
55697  # If so, the updated path is stored in $new_path.
55698
55699  input_path="$new_path"
55700  # Check if we need to convert this using DOS-style short mode. If the path
55701  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55702  # take no chances and rewrite it.
55703  # Note: m4 eats our [], so we need to use [ and ] instead.
55704  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55705  if test "x$has_forbidden_chars" != x; then
55706    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55707    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55708    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55709    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55710      # Going to short mode and back again did indeed matter. Since short mode is
55711      # case insensitive, let's make it lowercase to improve readability.
55712      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55713      # Now convert it back to Unix-style (cygpath)
55714      input_path=`$CYGPATH -u "$shortmode_path"`
55715      new_path="$input_path"
55716    fi
55717  fi
55718
55719  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55720  if test "x$test_cygdrive_prefix" = x; then
55721    # As a simple fix, exclude /usr/bin since it's not a real path.
55722    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55723      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55724      # a path prefixed by /cygdrive for fixpath to work.
55725      new_path="$CYGWIN_ROOT_PATH$input_path"
55726    fi
55727  fi
55728
55729
55730  if test "x$path" != "x$new_path"; then
55731    MSVC_DLL="$new_path"
55732    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55733$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55734  fi
55735
55736    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55737
55738  path="$MSVC_DLL"
55739  has_colon=`$ECHO $path | $GREP ^.:`
55740  new_path="$path"
55741  if test "x$has_colon" = x; then
55742    # Not in mixed or Windows style, start by that.
55743    new_path=`cmd //c echo $path`
55744  fi
55745
55746
55747  input_path="$new_path"
55748  # Check if we need to convert this using DOS-style short mode. If the path
55749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55750  # take no chances and rewrite it.
55751  # Note: m4 eats our [], so we need to use [ and ] instead.
55752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55753  if test "x$has_forbidden_chars" != x; then
55754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55755    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55756  fi
55757
55758
55759  windows_path="$new_path"
55760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55761    unix_path=`$CYGPATH -u "$windows_path"`
55762    new_path="$unix_path"
55763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55764    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55765    new_path="$unix_path"
55766  fi
55767
55768  if test "x$path" != "x$new_path"; then
55769    MSVC_DLL="$new_path"
55770    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55771$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55772  fi
55773
55774  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55775  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55776
55777    else
55778      # We're on a unix platform. Hooray! :)
55779      path="$MSVC_DLL"
55780      has_space=`$ECHO "$path" | $GREP " "`
55781      if test "x$has_space" != x; then
55782        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55783$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55784        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55785      fi
55786
55787      # Use eval to expand a potential ~
55788      eval path="$path"
55789      if test ! -f "$path" && test ! -d "$path"; then
55790        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55791      fi
55792
55793      if test -d "$path"; then
55794        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55795      else
55796        dir="`$DIRNAME "$path"`"
55797        base="`$BASENAME "$path"`"
55798        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55799      fi
55800    fi
55801  fi
55802
55803      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55804$as_echo_n "checking for $DLL_NAME... " >&6; }
55805      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55806$as_echo "$MSVC_DLL" >&6; }
55807    else
55808      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55809$as_echo "incorrect, ignoring" >&6; }
55810      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55811$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55812    fi
55813  fi
55814
55815    fi
55816  fi
55817
55818  if test "x$MSVC_DLL" = x; then
55819    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55820$as_echo_n "checking for $DLL_NAME... " >&6; }
55821    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55822$as_echo "no" >&6; }
55823    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55824  fi
55825
55826      MSVCP_DLL="$MSVC_DLL"
55827    fi
55828
55829  fi
55830
55831  fi
55832
55833
55834  if test "x$NEEDS_LIB_X11" = xfalse; then
55835    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55836      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55837$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55838    fi
55839    X_CFLAGS=
55840    X_LIBS=
55841  else
55842
55843    if test "x${with_x}" = xno; then
55844      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55845    fi
55846
55847    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55848      # The user has specified a X11 base directory. Use it for includes and
55849      # libraries, unless explicitely overridden.
55850      if test "x$x_includes" = xNONE; then
55851        x_includes="${with_x}/include"
55852      fi
55853      if test "x$x_libraries" = xNONE; then
55854        x_libraries="${with_x}/lib"
55855      fi
55856    else
55857      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55858      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55859      # --x-libraries for the sysroot, if that seems to be correct.
55860      if test "x$SYSROOT" != "x"; then
55861        if test "x$x_includes" = xNONE; then
55862          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55863            x_includes="$SYSROOT/usr/X11R6/include"
55864          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55865            x_includes="$SYSROOT/usr/include"
55866          fi
55867        fi
55868        if test "x$x_libraries" = xNONE; then
55869          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55870            x_libraries="$SYSROOT/usr/X11R6/lib"
55871          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55872            x_libraries="$SYSROOT/usr/lib64"
55873          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55874            x_libraries="$SYSROOT/usr/lib"
55875          fi
55876        fi
55877      fi
55878    fi
55879
55880    # Now let autoconf do it's magic
55881    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
55882$as_echo_n "checking for X... " >&6; }
55883
55884
55885# Check whether --with-x was given.
55886if test "${with_x+set}" = set; then :
55887  withval=$with_x;
55888fi
55889
55890# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
55891if test "x$with_x" = xno; then
55892  # The user explicitly disabled X.
55893  have_x=disabled
55894else
55895  case $x_includes,$x_libraries in #(
55896    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
55897    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
55898  $as_echo_n "(cached) " >&6
55899else
55900  # One or both of the vars are not set, and there is no cached value.
55901ac_x_includes=no ac_x_libraries=no
55902rm -f -r conftest.dir
55903if mkdir conftest.dir; then
55904  cd conftest.dir
55905  cat >Imakefile <<'_ACEOF'
55906incroot:
55907	@echo incroot='${INCROOT}'
55908usrlibdir:
55909	@echo usrlibdir='${USRLIBDIR}'
55910libdir:
55911	@echo libdir='${LIBDIR}'
55912_ACEOF
55913  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
55914    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
55915    for ac_var in incroot usrlibdir libdir; do
55916      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
55917    done
55918    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
55919    for ac_extension in a so sl dylib la dll; do
55920      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
55921	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
55922	ac_im_usrlibdir=$ac_im_libdir; break
55923      fi
55924    done
55925    # Screen out bogus values from the imake configuration.  They are
55926    # bogus both because they are the default anyway, and because
55927    # using them would break gcc on systems where it needs fixed includes.
55928    case $ac_im_incroot in
55929	/usr/include) ac_x_includes= ;;
55930	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
55931    esac
55932    case $ac_im_usrlibdir in
55933	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
55934	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
55935    esac
55936  fi
55937  cd ..
55938  rm -f -r conftest.dir
55939fi
55940
55941# Standard set of common directories for X headers.
55942# Check X11 before X11Rn because it is often a symlink to the current release.
55943ac_x_header_dirs='
55944/usr/X11/include
55945/usr/X11R7/include
55946/usr/X11R6/include
55947/usr/X11R5/include
55948/usr/X11R4/include
55949
55950/usr/include/X11
55951/usr/include/X11R7
55952/usr/include/X11R6
55953/usr/include/X11R5
55954/usr/include/X11R4
55955
55956/usr/local/X11/include
55957/usr/local/X11R7/include
55958/usr/local/X11R6/include
55959/usr/local/X11R5/include
55960/usr/local/X11R4/include
55961
55962/usr/local/include/X11
55963/usr/local/include/X11R7
55964/usr/local/include/X11R6
55965/usr/local/include/X11R5
55966/usr/local/include/X11R4
55967
55968/usr/X386/include
55969/usr/x386/include
55970/usr/XFree86/include/X11
55971
55972/usr/include
55973/usr/local/include
55974/usr/unsupported/include
55975/usr/athena/include
55976/usr/local/x11r5/include
55977/usr/lpp/Xamples/include
55978
55979/usr/openwin/include
55980/usr/openwin/share/include'
55981
55982if test "$ac_x_includes" = no; then
55983  # Guess where to find include files, by looking for Xlib.h.
55984  # First, try using that file with no special directory specified.
55985  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55986/* end confdefs.h.  */
55987#include <X11/Xlib.h>
55988_ACEOF
55989if ac_fn_cxx_try_cpp "$LINENO"; then :
55990  # We can compile using X headers with no special include directory.
55991ac_x_includes=
55992else
55993  for ac_dir in $ac_x_header_dirs; do
55994  if test -r "$ac_dir/X11/Xlib.h"; then
55995    ac_x_includes=$ac_dir
55996    break
55997  fi
55998done
55999fi
56000rm -f conftest.err conftest.i conftest.$ac_ext
56001fi # $ac_x_includes = no
56002
56003if test "$ac_x_libraries" = no; then
56004  # Check for the libraries.
56005  # See if we find them without any special options.
56006  # Don't add to $LIBS permanently.
56007  ac_save_LIBS=$LIBS
56008  LIBS="-lX11 $LIBS"
56009  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56010/* end confdefs.h.  */
56011#include <X11/Xlib.h>
56012int
56013main ()
56014{
56015XrmInitialize ()
56016  ;
56017  return 0;
56018}
56019_ACEOF
56020if ac_fn_cxx_try_link "$LINENO"; then :
56021  LIBS=$ac_save_LIBS
56022# We can link X programs with no special library path.
56023ac_x_libraries=
56024else
56025  LIBS=$ac_save_LIBS
56026for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56027do
56028  # Don't even attempt the hair of trying to link an X program!
56029  for ac_extension in a so sl dylib la dll; do
56030    if test -r "$ac_dir/libX11.$ac_extension"; then
56031      ac_x_libraries=$ac_dir
56032      break 2
56033    fi
56034  done
56035done
56036fi
56037rm -f core conftest.err conftest.$ac_objext \
56038    conftest$ac_exeext conftest.$ac_ext
56039fi # $ac_x_libraries = no
56040
56041case $ac_x_includes,$ac_x_libraries in #(
56042  no,* | *,no | *\'*)
56043    # Didn't find X, or a directory has "'" in its name.
56044    ac_cv_have_x="have_x=no";; #(
56045  *)
56046    # Record where we found X for the cache.
56047    ac_cv_have_x="have_x=yes\
56048	ac_x_includes='$ac_x_includes'\
56049	ac_x_libraries='$ac_x_libraries'"
56050esac
56051fi
56052;; #(
56053    *) have_x=yes;;
56054  esac
56055  eval "$ac_cv_have_x"
56056fi # $with_x != no
56057
56058if test "$have_x" != yes; then
56059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56060$as_echo "$have_x" >&6; }
56061  no_x=yes
56062else
56063  # If each of the values was on the command line, it overrides each guess.
56064  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56065  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56066  # Update the cache value to reflect the command line values.
56067  ac_cv_have_x="have_x=yes\
56068	ac_x_includes='$x_includes'\
56069	ac_x_libraries='$x_libraries'"
56070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56071$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56072fi
56073
56074    if test "$no_x" = yes; then
56075  # Not all programs may use this symbol, but it does not hurt to define it.
56076
56077$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56078
56079  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56080else
56081  if test -n "$x_includes"; then
56082    X_CFLAGS="$X_CFLAGS -I$x_includes"
56083  fi
56084
56085  # It would also be nice to do this for all -L options, not just this one.
56086  if test -n "$x_libraries"; then
56087    X_LIBS="$X_LIBS -L$x_libraries"
56088    # For Solaris; some versions of Sun CC require a space after -R and
56089    # others require no space.  Words are not sufficient . . . .
56090    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56091$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56092    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56093    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56094    ac_cxx_werror_flag=yes
56095    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56096/* end confdefs.h.  */
56097
56098int
56099main ()
56100{
56101
56102  ;
56103  return 0;
56104}
56105_ACEOF
56106if ac_fn_cxx_try_link "$LINENO"; then :
56107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56108$as_echo "no" >&6; }
56109       X_LIBS="$X_LIBS -R$x_libraries"
56110else
56111  LIBS="$ac_xsave_LIBS -R $x_libraries"
56112       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56113/* end confdefs.h.  */
56114
56115int
56116main ()
56117{
56118
56119  ;
56120  return 0;
56121}
56122_ACEOF
56123if ac_fn_cxx_try_link "$LINENO"; then :
56124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56125$as_echo "yes" >&6; }
56126	  X_LIBS="$X_LIBS -R $x_libraries"
56127else
56128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56129$as_echo "neither works" >&6; }
56130fi
56131rm -f core conftest.err conftest.$ac_objext \
56132    conftest$ac_exeext conftest.$ac_ext
56133fi
56134rm -f core conftest.err conftest.$ac_objext \
56135    conftest$ac_exeext conftest.$ac_ext
56136    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56137    LIBS=$ac_xsave_LIBS
56138  fi
56139
56140  # Check for system-dependent libraries X programs must link with.
56141  # Do this before checking for the system-independent R6 libraries
56142  # (-lICE), since we may need -lsocket or whatever for X linking.
56143
56144  if test "$ISC" = yes; then
56145    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56146  else
56147    # Martyn Johnson says this is needed for Ultrix, if the X
56148    # libraries were built with DECnet support.  And Karl Berry says
56149    # the Alpha needs dnet_stub (dnet does not exist).
56150    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56151    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56152/* end confdefs.h.  */
56153
56154/* Override any GCC internal prototype to avoid an error.
56155   Use char because int might match the return type of a GCC
56156   builtin and then its argument prototype would still apply.  */
56157#ifdef __cplusplus
56158extern "C"
56159#endif
56160char XOpenDisplay ();
56161int
56162main ()
56163{
56164return XOpenDisplay ();
56165  ;
56166  return 0;
56167}
56168_ACEOF
56169if ac_fn_cxx_try_link "$LINENO"; then :
56170
56171else
56172  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56173$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56174if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56175  $as_echo_n "(cached) " >&6
56176else
56177  ac_check_lib_save_LIBS=$LIBS
56178LIBS="-ldnet  $LIBS"
56179cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56180/* end confdefs.h.  */
56181
56182/* Override any GCC internal prototype to avoid an error.
56183   Use char because int might match the return type of a GCC
56184   builtin and then its argument prototype would still apply.  */
56185#ifdef __cplusplus
56186extern "C"
56187#endif
56188char dnet_ntoa ();
56189int
56190main ()
56191{
56192return dnet_ntoa ();
56193  ;
56194  return 0;
56195}
56196_ACEOF
56197if ac_fn_cxx_try_link "$LINENO"; then :
56198  ac_cv_lib_dnet_dnet_ntoa=yes
56199else
56200  ac_cv_lib_dnet_dnet_ntoa=no
56201fi
56202rm -f core conftest.err conftest.$ac_objext \
56203    conftest$ac_exeext conftest.$ac_ext
56204LIBS=$ac_check_lib_save_LIBS
56205fi
56206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56207$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56208if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56209  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56210fi
56211
56212    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56213      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56214$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56215if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56216  $as_echo_n "(cached) " >&6
56217else
56218  ac_check_lib_save_LIBS=$LIBS
56219LIBS="-ldnet_stub  $LIBS"
56220cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56221/* end confdefs.h.  */
56222
56223/* Override any GCC internal prototype to avoid an error.
56224   Use char because int might match the return type of a GCC
56225   builtin and then its argument prototype would still apply.  */
56226#ifdef __cplusplus
56227extern "C"
56228#endif
56229char dnet_ntoa ();
56230int
56231main ()
56232{
56233return dnet_ntoa ();
56234  ;
56235  return 0;
56236}
56237_ACEOF
56238if ac_fn_cxx_try_link "$LINENO"; then :
56239  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56240else
56241  ac_cv_lib_dnet_stub_dnet_ntoa=no
56242fi
56243rm -f core conftest.err conftest.$ac_objext \
56244    conftest$ac_exeext conftest.$ac_ext
56245LIBS=$ac_check_lib_save_LIBS
56246fi
56247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56248$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56249if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56250  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56251fi
56252
56253    fi
56254fi
56255rm -f core conftest.err conftest.$ac_objext \
56256    conftest$ac_exeext conftest.$ac_ext
56257    LIBS="$ac_xsave_LIBS"
56258
56259    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56260    # to get the SysV transport functions.
56261    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56262    # needs -lnsl.
56263    # The nsl library prevents programs from opening the X display
56264    # on Irix 5.2, according to T.E. Dickey.
56265    # The functions gethostbyname, getservbyname, and inet_addr are
56266    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56267    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56268if test "x$ac_cv_func_gethostbyname" = xyes; then :
56269
56270fi
56271
56272    if test $ac_cv_func_gethostbyname = no; then
56273      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56274$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56275if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56276  $as_echo_n "(cached) " >&6
56277else
56278  ac_check_lib_save_LIBS=$LIBS
56279LIBS="-lnsl  $LIBS"
56280cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56281/* end confdefs.h.  */
56282
56283/* Override any GCC internal prototype to avoid an error.
56284   Use char because int might match the return type of a GCC
56285   builtin and then its argument prototype would still apply.  */
56286#ifdef __cplusplus
56287extern "C"
56288#endif
56289char gethostbyname ();
56290int
56291main ()
56292{
56293return gethostbyname ();
56294  ;
56295  return 0;
56296}
56297_ACEOF
56298if ac_fn_cxx_try_link "$LINENO"; then :
56299  ac_cv_lib_nsl_gethostbyname=yes
56300else
56301  ac_cv_lib_nsl_gethostbyname=no
56302fi
56303rm -f core conftest.err conftest.$ac_objext \
56304    conftest$ac_exeext conftest.$ac_ext
56305LIBS=$ac_check_lib_save_LIBS
56306fi
56307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56308$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56309if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56310  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56311fi
56312
56313      if test $ac_cv_lib_nsl_gethostbyname = no; then
56314	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56315$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56316if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56317  $as_echo_n "(cached) " >&6
56318else
56319  ac_check_lib_save_LIBS=$LIBS
56320LIBS="-lbsd  $LIBS"
56321cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56322/* end confdefs.h.  */
56323
56324/* Override any GCC internal prototype to avoid an error.
56325   Use char because int might match the return type of a GCC
56326   builtin and then its argument prototype would still apply.  */
56327#ifdef __cplusplus
56328extern "C"
56329#endif
56330char gethostbyname ();
56331int
56332main ()
56333{
56334return gethostbyname ();
56335  ;
56336  return 0;
56337}
56338_ACEOF
56339if ac_fn_cxx_try_link "$LINENO"; then :
56340  ac_cv_lib_bsd_gethostbyname=yes
56341else
56342  ac_cv_lib_bsd_gethostbyname=no
56343fi
56344rm -f core conftest.err conftest.$ac_objext \
56345    conftest$ac_exeext conftest.$ac_ext
56346LIBS=$ac_check_lib_save_LIBS
56347fi
56348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56349$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56350if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56351  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56352fi
56353
56354      fi
56355    fi
56356
56357    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56358    # socket/setsockopt and other routines are undefined under SCO ODT
56359    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56360    # on later versions), says Simon Leinen: it contains gethostby*
56361    # variants that don't use the name server (or something).  -lsocket
56362    # must be given before -lnsl if both are needed.  We assume that
56363    # if connect needs -lnsl, so does gethostbyname.
56364    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56365if test "x$ac_cv_func_connect" = xyes; then :
56366
56367fi
56368
56369    if test $ac_cv_func_connect = no; then
56370      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56371$as_echo_n "checking for connect in -lsocket... " >&6; }
56372if ${ac_cv_lib_socket_connect+:} false; then :
56373  $as_echo_n "(cached) " >&6
56374else
56375  ac_check_lib_save_LIBS=$LIBS
56376LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56378/* end confdefs.h.  */
56379
56380/* Override any GCC internal prototype to avoid an error.
56381   Use char because int might match the return type of a GCC
56382   builtin and then its argument prototype would still apply.  */
56383#ifdef __cplusplus
56384extern "C"
56385#endif
56386char connect ();
56387int
56388main ()
56389{
56390return connect ();
56391  ;
56392  return 0;
56393}
56394_ACEOF
56395if ac_fn_cxx_try_link "$LINENO"; then :
56396  ac_cv_lib_socket_connect=yes
56397else
56398  ac_cv_lib_socket_connect=no
56399fi
56400rm -f core conftest.err conftest.$ac_objext \
56401    conftest$ac_exeext conftest.$ac_ext
56402LIBS=$ac_check_lib_save_LIBS
56403fi
56404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56405$as_echo "$ac_cv_lib_socket_connect" >&6; }
56406if test "x$ac_cv_lib_socket_connect" = xyes; then :
56407  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56408fi
56409
56410    fi
56411
56412    # Guillermo Gomez says -lposix is necessary on A/UX.
56413    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56414if test "x$ac_cv_func_remove" = xyes; then :
56415
56416fi
56417
56418    if test $ac_cv_func_remove = no; then
56419      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56420$as_echo_n "checking for remove in -lposix... " >&6; }
56421if ${ac_cv_lib_posix_remove+:} false; then :
56422  $as_echo_n "(cached) " >&6
56423else
56424  ac_check_lib_save_LIBS=$LIBS
56425LIBS="-lposix  $LIBS"
56426cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56427/* end confdefs.h.  */
56428
56429/* Override any GCC internal prototype to avoid an error.
56430   Use char because int might match the return type of a GCC
56431   builtin and then its argument prototype would still apply.  */
56432#ifdef __cplusplus
56433extern "C"
56434#endif
56435char remove ();
56436int
56437main ()
56438{
56439return remove ();
56440  ;
56441  return 0;
56442}
56443_ACEOF
56444if ac_fn_cxx_try_link "$LINENO"; then :
56445  ac_cv_lib_posix_remove=yes
56446else
56447  ac_cv_lib_posix_remove=no
56448fi
56449rm -f core conftest.err conftest.$ac_objext \
56450    conftest$ac_exeext conftest.$ac_ext
56451LIBS=$ac_check_lib_save_LIBS
56452fi
56453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56454$as_echo "$ac_cv_lib_posix_remove" >&6; }
56455if test "x$ac_cv_lib_posix_remove" = xyes; then :
56456  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56457fi
56458
56459    fi
56460
56461    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56462    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56463if test "x$ac_cv_func_shmat" = xyes; then :
56464
56465fi
56466
56467    if test $ac_cv_func_shmat = no; then
56468      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56469$as_echo_n "checking for shmat in -lipc... " >&6; }
56470if ${ac_cv_lib_ipc_shmat+:} false; then :
56471  $as_echo_n "(cached) " >&6
56472else
56473  ac_check_lib_save_LIBS=$LIBS
56474LIBS="-lipc  $LIBS"
56475cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56476/* end confdefs.h.  */
56477
56478/* Override any GCC internal prototype to avoid an error.
56479   Use char because int might match the return type of a GCC
56480   builtin and then its argument prototype would still apply.  */
56481#ifdef __cplusplus
56482extern "C"
56483#endif
56484char shmat ();
56485int
56486main ()
56487{
56488return shmat ();
56489  ;
56490  return 0;
56491}
56492_ACEOF
56493if ac_fn_cxx_try_link "$LINENO"; then :
56494  ac_cv_lib_ipc_shmat=yes
56495else
56496  ac_cv_lib_ipc_shmat=no
56497fi
56498rm -f core conftest.err conftest.$ac_objext \
56499    conftest$ac_exeext conftest.$ac_ext
56500LIBS=$ac_check_lib_save_LIBS
56501fi
56502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56503$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56504if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56505  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56506fi
56507
56508    fi
56509  fi
56510
56511  # Check for libraries that X11R6 Xt/Xaw programs need.
56512  ac_save_LDFLAGS=$LDFLAGS
56513  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56514  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56515  # check for ICE first), but we must link in the order -lSM -lICE or
56516  # we get undefined symbols.  So assume we have SM if we have ICE.
56517  # These have to be linked with before -lX11, unlike the other
56518  # libraries we check for below, so use a different variable.
56519  # John Interrante, Karl Berry
56520  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56521$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56522if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56523  $as_echo_n "(cached) " >&6
56524else
56525  ac_check_lib_save_LIBS=$LIBS
56526LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56527cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56528/* end confdefs.h.  */
56529
56530/* Override any GCC internal prototype to avoid an error.
56531   Use char because int might match the return type of a GCC
56532   builtin and then its argument prototype would still apply.  */
56533#ifdef __cplusplus
56534extern "C"
56535#endif
56536char IceConnectionNumber ();
56537int
56538main ()
56539{
56540return IceConnectionNumber ();
56541  ;
56542  return 0;
56543}
56544_ACEOF
56545if ac_fn_cxx_try_link "$LINENO"; then :
56546  ac_cv_lib_ICE_IceConnectionNumber=yes
56547else
56548  ac_cv_lib_ICE_IceConnectionNumber=no
56549fi
56550rm -f core conftest.err conftest.$ac_objext \
56551    conftest$ac_exeext conftest.$ac_ext
56552LIBS=$ac_check_lib_save_LIBS
56553fi
56554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56555$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56556if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56557  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56558fi
56559
56560  LDFLAGS=$ac_save_LDFLAGS
56561
56562fi
56563
56564
56565    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56566    # this doesn't make sense so we remove it.
56567    if test "x$COMPILE_TYPE" = xcross; then
56568      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56569    fi
56570
56571    if test "x$no_x" = xyes; then
56572
56573  # Print a helpful message on how to acquire the necessary build dependency.
56574  # x11 is the help tag: freetype, cups, alsa etc
56575  MISSING_DEPENDENCY=x11
56576
56577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56578    cygwin_help $MISSING_DEPENDENCY
56579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56580    msys_help $MISSING_DEPENDENCY
56581  else
56582    PKGHANDLER_COMMAND=
56583
56584    case $PKGHANDLER in
56585      apt-get)
56586        apt_help     $MISSING_DEPENDENCY ;;
56587      yum)
56588        yum_help     $MISSING_DEPENDENCY ;;
56589      port)
56590        port_help    $MISSING_DEPENDENCY ;;
56591      pkgutil)
56592        pkgutil_help $MISSING_DEPENDENCY ;;
56593      pkgadd)
56594        pkgadd_help  $MISSING_DEPENDENCY ;;
56595    esac
56596
56597    if test "x$PKGHANDLER_COMMAND" != x; then
56598      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56599    fi
56600  fi
56601
56602      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56603    fi
56604
56605    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56606      OPENWIN_HOME="/usr/openwin"
56607      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56608      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56609          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56610    fi
56611
56612    ac_ext=c
56613ac_cpp='$CPP $CPPFLAGS'
56614ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56615ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56616ac_compiler_gnu=$ac_cv_c_compiler_gnu
56617
56618    OLD_CFLAGS="$CFLAGS"
56619    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56620
56621    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56622    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56623do :
56624  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56625ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56626          # include <X11/Xlib.h>
56627          # include <X11/Xutil.h>
56628
56629
56630"
56631if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56632  cat >>confdefs.h <<_ACEOF
56633#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56634_ACEOF
56635 X11_HEADERS_OK=yes
56636else
56637  X11_HEADERS_OK=no; break
56638fi
56639
56640done
56641
56642
56643    if test "x$X11_HEADERS_OK" = xno; then
56644
56645  # Print a helpful message on how to acquire the necessary build dependency.
56646  # x11 is the help tag: freetype, cups, alsa etc
56647  MISSING_DEPENDENCY=x11
56648
56649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56650    cygwin_help $MISSING_DEPENDENCY
56651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56652    msys_help $MISSING_DEPENDENCY
56653  else
56654    PKGHANDLER_COMMAND=
56655
56656    case $PKGHANDLER in
56657      apt-get)
56658        apt_help     $MISSING_DEPENDENCY ;;
56659      yum)
56660        yum_help     $MISSING_DEPENDENCY ;;
56661      port)
56662        port_help    $MISSING_DEPENDENCY ;;
56663      pkgutil)
56664        pkgutil_help $MISSING_DEPENDENCY ;;
56665      pkgadd)
56666        pkgadd_help  $MISSING_DEPENDENCY ;;
56667    esac
56668
56669    if test "x$PKGHANDLER_COMMAND" != x; then
56670      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56671    fi
56672  fi
56673
56674      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56675    fi
56676
56677    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56678    # defined in libawt_xawt.
56679    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56680$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56681    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56682/* end confdefs.h.  */
56683#include <X11/extensions/Xrender.h>
56684int
56685main ()
56686{
56687XLinearGradient x;
56688  ;
56689  return 0;
56690}
56691_ACEOF
56692if ac_fn_c_try_compile "$LINENO"; then :
56693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56694$as_echo "yes" >&6; }
56695else
56696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56697$as_echo "no" >&6; }
56698         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56699fi
56700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56701
56702    CFLAGS="$OLD_CFLAGS"
56703    ac_ext=cpp
56704ac_cpp='$CXXCPP $CPPFLAGS'
56705ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56706ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56707ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56708
56709  fi # NEEDS_LIB_X11
56710
56711
56712
56713
56714
56715
56716# Check whether --with-cups was given.
56717if test "${with_cups+set}" = set; then :
56718  withval=$with_cups;
56719fi
56720
56721
56722# Check whether --with-cups-include was given.
56723if test "${with_cups_include+set}" = set; then :
56724  withval=$with_cups_include;
56725fi
56726
56727
56728  if test "x$NEEDS_LIB_CUPS" = xfalse; then
56729    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56730        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56731      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56732$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56733    fi
56734    CUPS_CFLAGS=
56735  else
56736    CUPS_FOUND=no
56737
56738    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56739      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56740    fi
56741
56742    if test "x${with_cups}" != x; then
56743      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56744$as_echo_n "checking for cups headers... " >&6; }
56745      if test -s "${with_cups}/include/cups/cups.h"; then
56746        CUPS_CFLAGS="-I${with_cups}/include"
56747        CUPS_FOUND=yes
56748        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56749$as_echo "$CUPS_FOUND" >&6; }
56750      else
56751        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56752      fi
56753    fi
56754    if test "x${with_cups_include}" != x; then
56755      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56756$as_echo_n "checking for cups headers... " >&6; }
56757      if test -s "${with_cups_include}/cups/cups.h"; then
56758        CUPS_CFLAGS="-I${with_cups_include}"
56759        CUPS_FOUND=yes
56760        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56761$as_echo "$CUPS_FOUND" >&6; }
56762      else
56763        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56764      fi
56765    fi
56766    if test "x$CUPS_FOUND" = xno; then
56767      # Are the cups headers installed in the default /usr/include location?
56768      for ac_header in cups/cups.h cups/ppd.h
56769do :
56770  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56771ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56772if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56773  cat >>confdefs.h <<_ACEOF
56774#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56775_ACEOF
56776
56777          CUPS_FOUND=yes
56778          CUPS_CFLAGS=
56779          DEFAULT_CUPS=yes
56780
56781fi
56782
56783done
56784
56785    fi
56786    if test "x$CUPS_FOUND" = xno; then
56787
56788  # Print a helpful message on how to acquire the necessary build dependency.
56789  # cups is the help tag: freetype, cups, alsa etc
56790  MISSING_DEPENDENCY=cups
56791
56792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56793    cygwin_help $MISSING_DEPENDENCY
56794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56795    msys_help $MISSING_DEPENDENCY
56796  else
56797    PKGHANDLER_COMMAND=
56798
56799    case $PKGHANDLER in
56800      apt-get)
56801        apt_help     $MISSING_DEPENDENCY ;;
56802      yum)
56803        yum_help     $MISSING_DEPENDENCY ;;
56804      port)
56805        port_help    $MISSING_DEPENDENCY ;;
56806      pkgutil)
56807        pkgutil_help $MISSING_DEPENDENCY ;;
56808      pkgadd)
56809        pkgadd_help  $MISSING_DEPENDENCY ;;
56810    esac
56811
56812    if test "x$PKGHANDLER_COMMAND" != x; then
56813      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56814    fi
56815  fi
56816
56817      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56818    fi
56819  fi
56820
56821
56822
56823
56824
56825# Check whether --with-freetype was given.
56826if test "${with_freetype+set}" = set; then :
56827  withval=$with_freetype;
56828fi
56829
56830
56831# Check whether --with-freetype-include was given.
56832if test "${with_freetype_include+set}" = set; then :
56833  withval=$with_freetype_include;
56834fi
56835
56836
56837# Check whether --with-freetype-lib was given.
56838if test "${with_freetype_lib+set}" = set; then :
56839  withval=$with_freetype_lib;
56840fi
56841
56842
56843# Check whether --with-freetype-src was given.
56844if test "${with_freetype_src+set}" = set; then :
56845  withval=$with_freetype_src;
56846fi
56847
56848  # Check whether --enable-freetype-bundling was given.
56849if test "${enable_freetype_bundling+set}" = set; then :
56850  enableval=$enable_freetype_bundling;
56851fi
56852
56853
56854  # Need to specify explicitly since it needs to be overridden on some versions of macosx
56855  FREETYPE_BASE_NAME=freetype
56856  FREETYPE_CFLAGS=
56857  FREETYPE_LIBS=
56858  FREETYPE_BUNDLE_LIB_PATH=
56859
56860  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
56861    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
56862        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
56863        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
56864        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
56865      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
56866$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
56867    fi
56868    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
56869      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
56870$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
56871    fi
56872  else
56873    # freetype is needed to build; go get it!
56874
56875    BUNDLE_FREETYPE="$enable_freetype_bundling"
56876
56877    if  test "x$with_freetype_src" != x; then
56878      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56879        # Try to build freetype if --with-freetype-src was given on Windows
56880
56881  FREETYPE_SRC_PATH="$with_freetype_src"
56882  BUILD_FREETYPE=yes
56883
56884  # Check if the freetype sources are acessible..
56885  if ! test -d $FREETYPE_SRC_PATH; then
56886    { $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
56887$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
56888    BUILD_FREETYPE=no
56889  fi
56890  # ..and contain a vc2010 project file
56891  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
56892  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
56893    { $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
56894$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
56895    BUILD_FREETYPE=no
56896  fi
56897  # Now check if configure found a version of 'msbuild.exe'
56898  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
56899    { $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
56900$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;}
56901    BUILD_FREETYPE=no
56902  fi
56903
56904  # Ready to go..
56905  if test "x$BUILD_FREETYPE" = xyes; then
56906    # msbuild requires trailing slashes for output directories
56907    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
56908    freetype_lib_path_unix="$freetype_lib_path"
56909    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
56910
56911  unix_path="$vcxproj_path"
56912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56913    windows_path=`$CYGPATH -m "$unix_path"`
56914    vcxproj_path="$windows_path"
56915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56916    windows_path=`cmd //c echo $unix_path`
56917    vcxproj_path="$windows_path"
56918  fi
56919
56920
56921  unix_path="$freetype_lib_path"
56922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56923    windows_path=`$CYGPATH -m "$unix_path"`
56924    freetype_lib_path="$windows_path"
56925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56926    windows_path=`cmd //c echo $unix_path`
56927    freetype_lib_path="$windows_path"
56928  fi
56929
56930
56931  unix_path="$freetype_obj_path"
56932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56933    windows_path=`$CYGPATH -m "$unix_path"`
56934    freetype_obj_path="$windows_path"
56935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56936    windows_path=`cmd //c echo $unix_path`
56937    freetype_obj_path="$windows_path"
56938  fi
56939
56940    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56941      freetype_platform=x64
56942    else
56943      freetype_platform=win32
56944    fi
56945
56946    # The original freetype project file is for VS 2010 (i.e. 'v100'),
56947    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
56948    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
56949    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
56950    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
56951$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
56952
56953    # First we try to build the freetype.dll
56954    $ECHO -e "@echo off\n"\
56955        "$MSBUILD $vcxproj_path "\
56956        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56957        "/p:Configuration=\"Release Multithreaded\" "\
56958        "/p:Platform=$freetype_platform "\
56959        "/p:ConfigurationType=DynamicLibrary "\
56960        "/p:TargetName=freetype "\
56961        "/p:OutDir=\"$freetype_lib_path\" "\
56962        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
56963    cmd /c freetype.bat
56964
56965    if test -s "$freetype_lib_path_unix/freetype.dll"; then
56966      # If that succeeds we also build freetype.lib
56967      $ECHO -e "@echo off\n"\
56968          "$MSBUILD $vcxproj_path "\
56969          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56970          "/p:Configuration=\"Release Multithreaded\" "\
56971          "/p:Platform=$freetype_platform "\
56972          "/p:ConfigurationType=StaticLibrary "\
56973          "/p:TargetName=freetype "\
56974          "/p:OutDir=\"$freetype_lib_path\" "\
56975          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
56976      cmd /c freetype.bat
56977
56978      if test -s "$freetype_lib_path_unix/freetype.lib"; then
56979        # Once we build both, lib and dll, set freetype lib and include path appropriately
56980        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
56981        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
56982        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
56983$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
56984      else
56985        BUILD_FREETYPE=no
56986      fi
56987    else
56988      BUILD_FREETYPE=no
56989    fi
56990  fi
56991
56992        if test "x$BUILD_FREETYPE" = xyes; then
56993          # Okay, we built it. Check that it works.
56994
56995  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56996  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56997  METHOD="--with-freetype-src"
56998
56999  # Let's start with an optimistic view of the world :-)
57000  FOUND_FREETYPE=yes
57001
57002  # First look for the canonical freetype main include file ft2build.h.
57003  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57004    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57005    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57006    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57007      # Fail.
57008      FOUND_FREETYPE=no
57009    fi
57010  fi
57011
57012  if test "x$FOUND_FREETYPE" = xyes; then
57013    # Include file found, let's continue the sanity check.
57014    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57015$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57016
57017    # Reset to default value
57018    FREETYPE_BASE_NAME=freetype
57019    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57020    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57021      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57022          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57023        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57024        # for the .6 version explicitly.
57025        FREETYPE_BASE_NAME=freetype.6
57026        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57027        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57028$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57029      else
57030        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57031$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57032        FOUND_FREETYPE=no
57033      fi
57034    else
57035      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57036        # On Windows, we will need both .lib and .dll file.
57037        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57038          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57039$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57040          FOUND_FREETYPE=no
57041        fi
57042      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57043          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57044        # Found lib in isa dir, use that instead.
57045        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57046        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57047$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57048      fi
57049    fi
57050  fi
57051
57052  if test "x$FOUND_FREETYPE" = xyes; then
57053
57054  # Only process if variable expands to non-empty
57055
57056  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57057    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57058
57059  # Input might be given as Windows format, start by converting to
57060  # unix format.
57061  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57062  new_path=`$CYGPATH -u "$path"`
57063
57064  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57065  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57066  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57067  # "foo.exe" is OK but "foo" is an error.
57068  #
57069  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57070  # It is also a way to make sure we got the proper file name for the real test later on.
57071  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57072  if test "x$test_shortpath" = x; then
57073    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57074$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57075    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57076  fi
57077
57078  # Call helper function which possibly converts this using DOS-style short mode.
57079  # If so, the updated path is stored in $new_path.
57080
57081  input_path="$new_path"
57082  # Check if we need to convert this using DOS-style short mode. If the path
57083  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57084  # take no chances and rewrite it.
57085  # Note: m4 eats our [], so we need to use [ and ] instead.
57086  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57087  if test "x$has_forbidden_chars" != x; then
57088    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57089    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57090    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57091    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57092      # Going to short mode and back again did indeed matter. Since short mode is
57093      # case insensitive, let's make it lowercase to improve readability.
57094      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57095      # Now convert it back to Unix-style (cygpath)
57096      input_path=`$CYGPATH -u "$shortmode_path"`
57097      new_path="$input_path"
57098    fi
57099  fi
57100
57101  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57102  if test "x$test_cygdrive_prefix" = x; then
57103    # As a simple fix, exclude /usr/bin since it's not a real path.
57104    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57105      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57106      # a path prefixed by /cygdrive for fixpath to work.
57107      new_path="$CYGWIN_ROOT_PATH$input_path"
57108    fi
57109  fi
57110
57111
57112  if test "x$path" != "x$new_path"; then
57113    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57114    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57115$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57116  fi
57117
57118    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57119
57120  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57121  has_colon=`$ECHO $path | $GREP ^.:`
57122  new_path="$path"
57123  if test "x$has_colon" = x; then
57124    # Not in mixed or Windows style, start by that.
57125    new_path=`cmd //c echo $path`
57126  fi
57127
57128
57129  input_path="$new_path"
57130  # Check if we need to convert this using DOS-style short mode. If the path
57131  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57132  # take no chances and rewrite it.
57133  # Note: m4 eats our [], so we need to use [ and ] instead.
57134  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57135  if test "x$has_forbidden_chars" != x; then
57136    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57137    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57138  fi
57139
57140
57141  windows_path="$new_path"
57142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57143    unix_path=`$CYGPATH -u "$windows_path"`
57144    new_path="$unix_path"
57145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57146    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57147    new_path="$unix_path"
57148  fi
57149
57150  if test "x$path" != "x$new_path"; then
57151    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57152    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57153$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57154  fi
57155
57156  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57157  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57158
57159    else
57160      # We're on a unix platform. Hooray! :)
57161      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57162      has_space=`$ECHO "$path" | $GREP " "`
57163      if test "x$has_space" != x; then
57164        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57165$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57166        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57167      fi
57168
57169      # Use eval to expand a potential ~
57170      eval path="$path"
57171      if test ! -f "$path" && test ! -d "$path"; then
57172        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57173      fi
57174
57175      if test -d "$path"; then
57176        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57177      else
57178        dir="`$DIRNAME "$path"`"
57179        base="`$BASENAME "$path"`"
57180        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57181      fi
57182    fi
57183  fi
57184
57185
57186  # Only process if variable expands to non-empty
57187
57188  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57189    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57190
57191  # Input might be given as Windows format, start by converting to
57192  # unix format.
57193  path="$POTENTIAL_FREETYPE_LIB_PATH"
57194  new_path=`$CYGPATH -u "$path"`
57195
57196  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57197  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57198  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57199  # "foo.exe" is OK but "foo" is an error.
57200  #
57201  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57202  # It is also a way to make sure we got the proper file name for the real test later on.
57203  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57204  if test "x$test_shortpath" = x; then
57205    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57206$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57207    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57208  fi
57209
57210  # Call helper function which possibly converts this using DOS-style short mode.
57211  # If so, the updated path is stored in $new_path.
57212
57213  input_path="$new_path"
57214  # Check if we need to convert this using DOS-style short mode. If the path
57215  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57216  # take no chances and rewrite it.
57217  # Note: m4 eats our [], so we need to use [ and ] instead.
57218  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57219  if test "x$has_forbidden_chars" != x; then
57220    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57221    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57222    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57223    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57224      # Going to short mode and back again did indeed matter. Since short mode is
57225      # case insensitive, let's make it lowercase to improve readability.
57226      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57227      # Now convert it back to Unix-style (cygpath)
57228      input_path=`$CYGPATH -u "$shortmode_path"`
57229      new_path="$input_path"
57230    fi
57231  fi
57232
57233  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57234  if test "x$test_cygdrive_prefix" = x; then
57235    # As a simple fix, exclude /usr/bin since it's not a real path.
57236    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57237      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57238      # a path prefixed by /cygdrive for fixpath to work.
57239      new_path="$CYGWIN_ROOT_PATH$input_path"
57240    fi
57241  fi
57242
57243
57244  if test "x$path" != "x$new_path"; then
57245    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57246    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57247$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57248  fi
57249
57250    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57251
57252  path="$POTENTIAL_FREETYPE_LIB_PATH"
57253  has_colon=`$ECHO $path | $GREP ^.:`
57254  new_path="$path"
57255  if test "x$has_colon" = x; then
57256    # Not in mixed or Windows style, start by that.
57257    new_path=`cmd //c echo $path`
57258  fi
57259
57260
57261  input_path="$new_path"
57262  # Check if we need to convert this using DOS-style short mode. If the path
57263  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57264  # take no chances and rewrite it.
57265  # Note: m4 eats our [], so we need to use [ and ] instead.
57266  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57267  if test "x$has_forbidden_chars" != x; then
57268    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57269    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57270  fi
57271
57272
57273  windows_path="$new_path"
57274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57275    unix_path=`$CYGPATH -u "$windows_path"`
57276    new_path="$unix_path"
57277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57278    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57279    new_path="$unix_path"
57280  fi
57281
57282  if test "x$path" != "x$new_path"; then
57283    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57284    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57285$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57286  fi
57287
57288  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57289  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57290
57291    else
57292      # We're on a unix platform. Hooray! :)
57293      path="$POTENTIAL_FREETYPE_LIB_PATH"
57294      has_space=`$ECHO "$path" | $GREP " "`
57295      if test "x$has_space" != x; then
57296        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57297$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57298        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57299      fi
57300
57301      # Use eval to expand a potential ~
57302      eval path="$path"
57303      if test ! -f "$path" && test ! -d "$path"; then
57304        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57305      fi
57306
57307      if test -d "$path"; then
57308        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57309      else
57310        dir="`$DIRNAME "$path"`"
57311        base="`$BASENAME "$path"`"
57312        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57313      fi
57314    fi
57315  fi
57316
57317
57318    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57319    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57320$as_echo_n "checking for freetype includes... " >&6; }
57321    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57322$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57323    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57324    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57325$as_echo_n "checking for freetype libraries... " >&6; }
57326    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57327$as_echo "$FREETYPE_LIB_PATH" >&6; }
57328  fi
57329
57330          if test "x$FOUND_FREETYPE" != xyes; then
57331            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57332          fi
57333        else
57334          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57335$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57336          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57337        fi
57338      else
57339        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57340$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57341      fi
57342    fi
57343
57344    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57345      # User has specified settings
57346
57347      if test "x$BUNDLE_FREETYPE" = x; then
57348        # If not specified, default is to bundle freetype
57349        BUNDLE_FREETYPE=yes
57350      fi
57351
57352      if test "x$with_freetype" != x; then
57353        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57354        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57355      fi
57356
57357      # Allow --with-freetype-lib and --with-freetype-include to override
57358      if test "x$with_freetype_include" != x; then
57359        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57360      fi
57361      if test "x$with_freetype_lib" != x; then
57362        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57363      fi
57364
57365      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57366        # Okay, we got it. Check that it works.
57367
57368  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57369  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57370  METHOD="--with-freetype"
57371
57372  # Let's start with an optimistic view of the world :-)
57373  FOUND_FREETYPE=yes
57374
57375  # First look for the canonical freetype main include file ft2build.h.
57376  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57377    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57378    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57379    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57380      # Fail.
57381      FOUND_FREETYPE=no
57382    fi
57383  fi
57384
57385  if test "x$FOUND_FREETYPE" = xyes; then
57386    # Include file found, let's continue the sanity check.
57387    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57388$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57389
57390    # Reset to default value
57391    FREETYPE_BASE_NAME=freetype
57392    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57393    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57394      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57395          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57396        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57397        # for the .6 version explicitly.
57398        FREETYPE_BASE_NAME=freetype.6
57399        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57400        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57401$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57402      else
57403        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57404$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57405        FOUND_FREETYPE=no
57406      fi
57407    else
57408      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57409        # On Windows, we will need both .lib and .dll file.
57410        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57411          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57412$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57413          FOUND_FREETYPE=no
57414        fi
57415      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57416          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57417        # Found lib in isa dir, use that instead.
57418        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57419        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57420$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57421      fi
57422    fi
57423  fi
57424
57425  if test "x$FOUND_FREETYPE" = xyes; then
57426
57427  # Only process if variable expands to non-empty
57428
57429  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57430    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57431
57432  # Input might be given as Windows format, start by converting to
57433  # unix format.
57434  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57435  new_path=`$CYGPATH -u "$path"`
57436
57437  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57438  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57439  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57440  # "foo.exe" is OK but "foo" is an error.
57441  #
57442  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57443  # It is also a way to make sure we got the proper file name for the real test later on.
57444  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57445  if test "x$test_shortpath" = x; then
57446    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57447$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57448    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57449  fi
57450
57451  # Call helper function which possibly converts this using DOS-style short mode.
57452  # If so, the updated path is stored in $new_path.
57453
57454  input_path="$new_path"
57455  # Check if we need to convert this using DOS-style short mode. If the path
57456  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57457  # take no chances and rewrite it.
57458  # Note: m4 eats our [], so we need to use [ and ] instead.
57459  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57460  if test "x$has_forbidden_chars" != x; then
57461    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57462    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57463    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57464    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57465      # Going to short mode and back again did indeed matter. Since short mode is
57466      # case insensitive, let's make it lowercase to improve readability.
57467      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57468      # Now convert it back to Unix-style (cygpath)
57469      input_path=`$CYGPATH -u "$shortmode_path"`
57470      new_path="$input_path"
57471    fi
57472  fi
57473
57474  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57475  if test "x$test_cygdrive_prefix" = x; then
57476    # As a simple fix, exclude /usr/bin since it's not a real path.
57477    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57478      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57479      # a path prefixed by /cygdrive for fixpath to work.
57480      new_path="$CYGWIN_ROOT_PATH$input_path"
57481    fi
57482  fi
57483
57484
57485  if test "x$path" != "x$new_path"; then
57486    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57487    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57488$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57489  fi
57490
57491    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57492
57493  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57494  has_colon=`$ECHO $path | $GREP ^.:`
57495  new_path="$path"
57496  if test "x$has_colon" = x; then
57497    # Not in mixed or Windows style, start by that.
57498    new_path=`cmd //c echo $path`
57499  fi
57500
57501
57502  input_path="$new_path"
57503  # Check if we need to convert this using DOS-style short mode. If the path
57504  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57505  # take no chances and rewrite it.
57506  # Note: m4 eats our [], so we need to use [ and ] instead.
57507  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57508  if test "x$has_forbidden_chars" != x; then
57509    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57510    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57511  fi
57512
57513
57514  windows_path="$new_path"
57515  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57516    unix_path=`$CYGPATH -u "$windows_path"`
57517    new_path="$unix_path"
57518  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57519    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57520    new_path="$unix_path"
57521  fi
57522
57523  if test "x$path" != "x$new_path"; then
57524    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57525    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57526$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57527  fi
57528
57529  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57530  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57531
57532    else
57533      # We're on a unix platform. Hooray! :)
57534      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57535      has_space=`$ECHO "$path" | $GREP " "`
57536      if test "x$has_space" != x; then
57537        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57538$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57539        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57540      fi
57541
57542      # Use eval to expand a potential ~
57543      eval path="$path"
57544      if test ! -f "$path" && test ! -d "$path"; then
57545        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57546      fi
57547
57548      if test -d "$path"; then
57549        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57550      else
57551        dir="`$DIRNAME "$path"`"
57552        base="`$BASENAME "$path"`"
57553        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57554      fi
57555    fi
57556  fi
57557
57558
57559  # Only process if variable expands to non-empty
57560
57561  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57562    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57563
57564  # Input might be given as Windows format, start by converting to
57565  # unix format.
57566  path="$POTENTIAL_FREETYPE_LIB_PATH"
57567  new_path=`$CYGPATH -u "$path"`
57568
57569  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57570  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57571  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57572  # "foo.exe" is OK but "foo" is an error.
57573  #
57574  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57575  # It is also a way to make sure we got the proper file name for the real test later on.
57576  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57577  if test "x$test_shortpath" = x; then
57578    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57579$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57580    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57581  fi
57582
57583  # Call helper function which possibly converts this using DOS-style short mode.
57584  # If so, the updated path is stored in $new_path.
57585
57586  input_path="$new_path"
57587  # Check if we need to convert this using DOS-style short mode. If the path
57588  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57589  # take no chances and rewrite it.
57590  # Note: m4 eats our [], so we need to use [ and ] instead.
57591  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57592  if test "x$has_forbidden_chars" != x; then
57593    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57594    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57595    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57596    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57597      # Going to short mode and back again did indeed matter. Since short mode is
57598      # case insensitive, let's make it lowercase to improve readability.
57599      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57600      # Now convert it back to Unix-style (cygpath)
57601      input_path=`$CYGPATH -u "$shortmode_path"`
57602      new_path="$input_path"
57603    fi
57604  fi
57605
57606  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57607  if test "x$test_cygdrive_prefix" = x; then
57608    # As a simple fix, exclude /usr/bin since it's not a real path.
57609    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57610      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57611      # a path prefixed by /cygdrive for fixpath to work.
57612      new_path="$CYGWIN_ROOT_PATH$input_path"
57613    fi
57614  fi
57615
57616
57617  if test "x$path" != "x$new_path"; then
57618    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57619    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57620$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57621  fi
57622
57623    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57624
57625  path="$POTENTIAL_FREETYPE_LIB_PATH"
57626  has_colon=`$ECHO $path | $GREP ^.:`
57627  new_path="$path"
57628  if test "x$has_colon" = x; then
57629    # Not in mixed or Windows style, start by that.
57630    new_path=`cmd //c echo $path`
57631  fi
57632
57633
57634  input_path="$new_path"
57635  # Check if we need to convert this using DOS-style short mode. If the path
57636  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57637  # take no chances and rewrite it.
57638  # Note: m4 eats our [], so we need to use [ and ] instead.
57639  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57640  if test "x$has_forbidden_chars" != x; then
57641    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57642    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57643  fi
57644
57645
57646  windows_path="$new_path"
57647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57648    unix_path=`$CYGPATH -u "$windows_path"`
57649    new_path="$unix_path"
57650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57651    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57652    new_path="$unix_path"
57653  fi
57654
57655  if test "x$path" != "x$new_path"; then
57656    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57657    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57658$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57659  fi
57660
57661  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57662  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57663
57664    else
57665      # We're on a unix platform. Hooray! :)
57666      path="$POTENTIAL_FREETYPE_LIB_PATH"
57667      has_space=`$ECHO "$path" | $GREP " "`
57668      if test "x$has_space" != x; then
57669        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57670$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57671        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57672      fi
57673
57674      # Use eval to expand a potential ~
57675      eval path="$path"
57676      if test ! -f "$path" && test ! -d "$path"; then
57677        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57678      fi
57679
57680      if test -d "$path"; then
57681        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57682      else
57683        dir="`$DIRNAME "$path"`"
57684        base="`$BASENAME "$path"`"
57685        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57686      fi
57687    fi
57688  fi
57689
57690
57691    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57692    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57693$as_echo_n "checking for freetype includes... " >&6; }
57694    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57695$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57696    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57697    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57698$as_echo_n "checking for freetype libraries... " >&6; }
57699    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57700$as_echo "$FREETYPE_LIB_PATH" >&6; }
57701  fi
57702
57703        if test "x$FOUND_FREETYPE" != xyes; then
57704          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57705        fi
57706      else
57707        # User specified only one of lib or include. This is an error.
57708        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57709          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57710$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57711          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57712        else
57713          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57714$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57715          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57716        fi
57717      fi
57718    else
57719      # User did not specify settings, but we need freetype. Try to locate it.
57720
57721      if test "x$BUNDLE_FREETYPE" = x; then
57722        # If not specified, default is to bundle freetype only on windows
57723        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57724          BUNDLE_FREETYPE=yes
57725        else
57726          BUNDLE_FREETYPE=no
57727        fi
57728      fi
57729
57730      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57731      if test "x$SYSROOT" = x; then
57732        if test "x$FOUND_FREETYPE" != xyes; then
57733          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57734          if test "x$PKG_CONFIG" != x; then
57735
57736pkg_failed=no
57737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57738$as_echo_n "checking for FREETYPE... " >&6; }
57739
57740if test -n "$FREETYPE_CFLAGS"; then
57741    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57742 elif test -n "$PKG_CONFIG"; then
57743    if test -n "$PKG_CONFIG" && \
57744    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57745  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57746  ac_status=$?
57747  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57748  test $ac_status = 0; }; then
57749  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57750else
57751  pkg_failed=yes
57752fi
57753 else
57754    pkg_failed=untried
57755fi
57756if test -n "$FREETYPE_LIBS"; then
57757    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57758 elif test -n "$PKG_CONFIG"; then
57759    if test -n "$PKG_CONFIG" && \
57760    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57761  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57762  ac_status=$?
57763  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57764  test $ac_status = 0; }; then
57765  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57766else
57767  pkg_failed=yes
57768fi
57769 else
57770    pkg_failed=untried
57771fi
57772
57773
57774
57775if test $pkg_failed = yes; then
57776
57777if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57778        _pkg_short_errors_supported=yes
57779else
57780        _pkg_short_errors_supported=no
57781fi
57782        if test $_pkg_short_errors_supported = yes; then
57783	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57784        else
57785	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57786        fi
57787	# Put the nasty error message in config.log where it belongs
57788	echo "$FREETYPE_PKG_ERRORS" >&5
57789
57790	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57791$as_echo "no" >&6; }
57792                FOUND_FREETYPE=no
57793elif test $pkg_failed = untried; then
57794	FOUND_FREETYPE=no
57795else
57796	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57797	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57798        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57799$as_echo "yes" >&6; }
57800	FOUND_FREETYPE=yes
57801fi
57802            if test "x$FOUND_FREETYPE" = xyes; then
57803              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57804              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57805              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57806              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57807                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57808              fi
57809              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57810              if test "x$BUNDLE_FREETYPE" = xyes; then
57811                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57812$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57813                FOUND_FREETYPE=no
57814              else
57815                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57816$as_echo_n "checking for freetype... " >&6; }
57817                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57818$as_echo "yes (using pkg-config)" >&6; }
57819              fi
57820            fi
57821          fi
57822        fi
57823      fi
57824
57825      if test "x$FOUND_FREETYPE" != xyes; then
57826        # Check in well-known locations
57827        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57828          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57829
57830  windows_path="$FREETYPE_BASE_DIR"
57831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57832    unix_path=`$CYGPATH -u "$windows_path"`
57833    FREETYPE_BASE_DIR="$unix_path"
57834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57836    FREETYPE_BASE_DIR="$unix_path"
57837  fi
57838
57839
57840  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57841  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57842  METHOD="well-known location"
57843
57844  # Let's start with an optimistic view of the world :-)
57845  FOUND_FREETYPE=yes
57846
57847  # First look for the canonical freetype main include file ft2build.h.
57848  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57849    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57850    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57851    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57852      # Fail.
57853      FOUND_FREETYPE=no
57854    fi
57855  fi
57856
57857  if test "x$FOUND_FREETYPE" = xyes; then
57858    # Include file found, let's continue the sanity check.
57859    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57860$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57861
57862    # Reset to default value
57863    FREETYPE_BASE_NAME=freetype
57864    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57865    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57866      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57867          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57868        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57869        # for the .6 version explicitly.
57870        FREETYPE_BASE_NAME=freetype.6
57871        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57872        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57873$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57874      else
57875        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57876$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57877        FOUND_FREETYPE=no
57878      fi
57879    else
57880      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57881        # On Windows, we will need both .lib and .dll file.
57882        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57883          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57884$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57885          FOUND_FREETYPE=no
57886        fi
57887      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57888          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57889        # Found lib in isa dir, use that instead.
57890        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57891        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57892$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57893      fi
57894    fi
57895  fi
57896
57897  if test "x$FOUND_FREETYPE" = xyes; then
57898
57899  # Only process if variable expands to non-empty
57900
57901  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57902    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57903
57904  # Input might be given as Windows format, start by converting to
57905  # unix format.
57906  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57907  new_path=`$CYGPATH -u "$path"`
57908
57909  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57910  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57911  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57912  # "foo.exe" is OK but "foo" is an error.
57913  #
57914  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57915  # It is also a way to make sure we got the proper file name for the real test later on.
57916  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57917  if test "x$test_shortpath" = x; then
57918    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57919$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57920    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57921  fi
57922
57923  # Call helper function which possibly converts this using DOS-style short mode.
57924  # If so, the updated path is stored in $new_path.
57925
57926  input_path="$new_path"
57927  # Check if we need to convert this using DOS-style short mode. If the path
57928  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57929  # take no chances and rewrite it.
57930  # Note: m4 eats our [], so we need to use [ and ] instead.
57931  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57932  if test "x$has_forbidden_chars" != x; then
57933    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57934    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57935    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57936    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57937      # Going to short mode and back again did indeed matter. Since short mode is
57938      # case insensitive, let's make it lowercase to improve readability.
57939      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57940      # Now convert it back to Unix-style (cygpath)
57941      input_path=`$CYGPATH -u "$shortmode_path"`
57942      new_path="$input_path"
57943    fi
57944  fi
57945
57946  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57947  if test "x$test_cygdrive_prefix" = x; then
57948    # As a simple fix, exclude /usr/bin since it's not a real path.
57949    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57950      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57951      # a path prefixed by /cygdrive for fixpath to work.
57952      new_path="$CYGWIN_ROOT_PATH$input_path"
57953    fi
57954  fi
57955
57956
57957  if test "x$path" != "x$new_path"; then
57958    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57959    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57960$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57961  fi
57962
57963    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57964
57965  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57966  has_colon=`$ECHO $path | $GREP ^.:`
57967  new_path="$path"
57968  if test "x$has_colon" = x; then
57969    # Not in mixed or Windows style, start by that.
57970    new_path=`cmd //c echo $path`
57971  fi
57972
57973
57974  input_path="$new_path"
57975  # Check if we need to convert this using DOS-style short mode. If the path
57976  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57977  # take no chances and rewrite it.
57978  # Note: m4 eats our [], so we need to use [ and ] instead.
57979  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57980  if test "x$has_forbidden_chars" != x; then
57981    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57982    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57983  fi
57984
57985
57986  windows_path="$new_path"
57987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57988    unix_path=`$CYGPATH -u "$windows_path"`
57989    new_path="$unix_path"
57990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57992    new_path="$unix_path"
57993  fi
57994
57995  if test "x$path" != "x$new_path"; then
57996    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57997    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57998$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57999  fi
58000
58001  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58002  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58003
58004    else
58005      # We're on a unix platform. Hooray! :)
58006      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58007      has_space=`$ECHO "$path" | $GREP " "`
58008      if test "x$has_space" != x; then
58009        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58010$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58011        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58012      fi
58013
58014      # Use eval to expand a potential ~
58015      eval path="$path"
58016      if test ! -f "$path" && test ! -d "$path"; then
58017        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58018      fi
58019
58020      if test -d "$path"; then
58021        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58022      else
58023        dir="`$DIRNAME "$path"`"
58024        base="`$BASENAME "$path"`"
58025        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58026      fi
58027    fi
58028  fi
58029
58030
58031  # Only process if variable expands to non-empty
58032
58033  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58034    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58035
58036  # Input might be given as Windows format, start by converting to
58037  # unix format.
58038  path="$POTENTIAL_FREETYPE_LIB_PATH"
58039  new_path=`$CYGPATH -u "$path"`
58040
58041  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58042  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58043  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58044  # "foo.exe" is OK but "foo" is an error.
58045  #
58046  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58047  # It is also a way to make sure we got the proper file name for the real test later on.
58048  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58049  if test "x$test_shortpath" = x; then
58050    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58051$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58052    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58053  fi
58054
58055  # Call helper function which possibly converts this using DOS-style short mode.
58056  # If so, the updated path is stored in $new_path.
58057
58058  input_path="$new_path"
58059  # Check if we need to convert this using DOS-style short mode. If the path
58060  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58061  # take no chances and rewrite it.
58062  # Note: m4 eats our [], so we need to use [ and ] instead.
58063  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58064  if test "x$has_forbidden_chars" != x; then
58065    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58066    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58067    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58068    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58069      # Going to short mode and back again did indeed matter. Since short mode is
58070      # case insensitive, let's make it lowercase to improve readability.
58071      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58072      # Now convert it back to Unix-style (cygpath)
58073      input_path=`$CYGPATH -u "$shortmode_path"`
58074      new_path="$input_path"
58075    fi
58076  fi
58077
58078  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58079  if test "x$test_cygdrive_prefix" = x; then
58080    # As a simple fix, exclude /usr/bin since it's not a real path.
58081    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58082      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58083      # a path prefixed by /cygdrive for fixpath to work.
58084      new_path="$CYGWIN_ROOT_PATH$input_path"
58085    fi
58086  fi
58087
58088
58089  if test "x$path" != "x$new_path"; then
58090    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58091    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58092$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58093  fi
58094
58095    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58096
58097  path="$POTENTIAL_FREETYPE_LIB_PATH"
58098  has_colon=`$ECHO $path | $GREP ^.:`
58099  new_path="$path"
58100  if test "x$has_colon" = x; then
58101    # Not in mixed or Windows style, start by that.
58102    new_path=`cmd //c echo $path`
58103  fi
58104
58105
58106  input_path="$new_path"
58107  # Check if we need to convert this using DOS-style short mode. If the path
58108  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58109  # take no chances and rewrite it.
58110  # Note: m4 eats our [], so we need to use [ and ] instead.
58111  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58112  if test "x$has_forbidden_chars" != x; then
58113    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58114    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58115  fi
58116
58117
58118  windows_path="$new_path"
58119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58120    unix_path=`$CYGPATH -u "$windows_path"`
58121    new_path="$unix_path"
58122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58123    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58124    new_path="$unix_path"
58125  fi
58126
58127  if test "x$path" != "x$new_path"; then
58128    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58129    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58130$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58131  fi
58132
58133  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58134  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58135
58136    else
58137      # We're on a unix platform. Hooray! :)
58138      path="$POTENTIAL_FREETYPE_LIB_PATH"
58139      has_space=`$ECHO "$path" | $GREP " "`
58140      if test "x$has_space" != x; then
58141        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58142$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58143        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58144      fi
58145
58146      # Use eval to expand a potential ~
58147      eval path="$path"
58148      if test ! -f "$path" && test ! -d "$path"; then
58149        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58150      fi
58151
58152      if test -d "$path"; then
58153        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58154      else
58155        dir="`$DIRNAME "$path"`"
58156        base="`$BASENAME "$path"`"
58157        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58158      fi
58159    fi
58160  fi
58161
58162
58163    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58164    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58165$as_echo_n "checking for freetype includes... " >&6; }
58166    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58167$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58168    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58169    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58170$as_echo_n "checking for freetype libraries... " >&6; }
58171    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58172$as_echo "$FREETYPE_LIB_PATH" >&6; }
58173  fi
58174
58175          if test "x$FOUND_FREETYPE" != xyes; then
58176            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58177
58178  windows_path="$FREETYPE_BASE_DIR"
58179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58180    unix_path=`$CYGPATH -u "$windows_path"`
58181    FREETYPE_BASE_DIR="$unix_path"
58182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58183    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58184    FREETYPE_BASE_DIR="$unix_path"
58185  fi
58186
58187
58188  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58189  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58190  METHOD="well-known location"
58191
58192  # Let's start with an optimistic view of the world :-)
58193  FOUND_FREETYPE=yes
58194
58195  # First look for the canonical freetype main include file ft2build.h.
58196  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58197    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58198    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58199    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58200      # Fail.
58201      FOUND_FREETYPE=no
58202    fi
58203  fi
58204
58205  if test "x$FOUND_FREETYPE" = xyes; then
58206    # Include file found, let's continue the sanity check.
58207    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58208$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58209
58210    # Reset to default value
58211    FREETYPE_BASE_NAME=freetype
58212    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58213    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58214      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58215          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58216        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58217        # for the .6 version explicitly.
58218        FREETYPE_BASE_NAME=freetype.6
58219        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58220        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58221$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58222      else
58223        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58224$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58225        FOUND_FREETYPE=no
58226      fi
58227    else
58228      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58229        # On Windows, we will need both .lib and .dll file.
58230        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58231          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58232$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58233          FOUND_FREETYPE=no
58234        fi
58235      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58236          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58237        # Found lib in isa dir, use that instead.
58238        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58239        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58240$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58241      fi
58242    fi
58243  fi
58244
58245  if test "x$FOUND_FREETYPE" = xyes; then
58246
58247  # Only process if variable expands to non-empty
58248
58249  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58250    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58251
58252  # Input might be given as Windows format, start by converting to
58253  # unix format.
58254  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58255  new_path=`$CYGPATH -u "$path"`
58256
58257  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58258  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58259  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58260  # "foo.exe" is OK but "foo" is an error.
58261  #
58262  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58263  # It is also a way to make sure we got the proper file name for the real test later on.
58264  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58265  if test "x$test_shortpath" = x; then
58266    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58267$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58268    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58269  fi
58270
58271  # Call helper function which possibly converts this using DOS-style short mode.
58272  # If so, the updated path is stored in $new_path.
58273
58274  input_path="$new_path"
58275  # Check if we need to convert this using DOS-style short mode. If the path
58276  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58277  # take no chances and rewrite it.
58278  # Note: m4 eats our [], so we need to use [ and ] instead.
58279  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58280  if test "x$has_forbidden_chars" != x; then
58281    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58282    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58283    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58284    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58285      # Going to short mode and back again did indeed matter. Since short mode is
58286      # case insensitive, let's make it lowercase to improve readability.
58287      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58288      # Now convert it back to Unix-style (cygpath)
58289      input_path=`$CYGPATH -u "$shortmode_path"`
58290      new_path="$input_path"
58291    fi
58292  fi
58293
58294  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58295  if test "x$test_cygdrive_prefix" = x; then
58296    # As a simple fix, exclude /usr/bin since it's not a real path.
58297    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58298      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58299      # a path prefixed by /cygdrive for fixpath to work.
58300      new_path="$CYGWIN_ROOT_PATH$input_path"
58301    fi
58302  fi
58303
58304
58305  if test "x$path" != "x$new_path"; then
58306    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58307    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58308$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58309  fi
58310
58311    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58312
58313  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58314  has_colon=`$ECHO $path | $GREP ^.:`
58315  new_path="$path"
58316  if test "x$has_colon" = x; then
58317    # Not in mixed or Windows style, start by that.
58318    new_path=`cmd //c echo $path`
58319  fi
58320
58321
58322  input_path="$new_path"
58323  # Check if we need to convert this using DOS-style short mode. If the path
58324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58325  # take no chances and rewrite it.
58326  # Note: m4 eats our [], so we need to use [ and ] instead.
58327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58328  if test "x$has_forbidden_chars" != x; then
58329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58330    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58331  fi
58332
58333
58334  windows_path="$new_path"
58335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58336    unix_path=`$CYGPATH -u "$windows_path"`
58337    new_path="$unix_path"
58338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58339    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58340    new_path="$unix_path"
58341  fi
58342
58343  if test "x$path" != "x$new_path"; then
58344    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58345    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58346$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58347  fi
58348
58349  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58350  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58351
58352    else
58353      # We're on a unix platform. Hooray! :)
58354      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58355      has_space=`$ECHO "$path" | $GREP " "`
58356      if test "x$has_space" != x; then
58357        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58358$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58359        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58360      fi
58361
58362      # Use eval to expand a potential ~
58363      eval path="$path"
58364      if test ! -f "$path" && test ! -d "$path"; then
58365        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58366      fi
58367
58368      if test -d "$path"; then
58369        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58370      else
58371        dir="`$DIRNAME "$path"`"
58372        base="`$BASENAME "$path"`"
58373        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58374      fi
58375    fi
58376  fi
58377
58378
58379  # Only process if variable expands to non-empty
58380
58381  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58382    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58383
58384  # Input might be given as Windows format, start by converting to
58385  # unix format.
58386  path="$POTENTIAL_FREETYPE_LIB_PATH"
58387  new_path=`$CYGPATH -u "$path"`
58388
58389  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58390  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58391  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58392  # "foo.exe" is OK but "foo" is an error.
58393  #
58394  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58395  # It is also a way to make sure we got the proper file name for the real test later on.
58396  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58397  if test "x$test_shortpath" = x; then
58398    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58399$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58400    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58401  fi
58402
58403  # Call helper function which possibly converts this using DOS-style short mode.
58404  # If so, the updated path is stored in $new_path.
58405
58406  input_path="$new_path"
58407  # Check if we need to convert this using DOS-style short mode. If the path
58408  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58409  # take no chances and rewrite it.
58410  # Note: m4 eats our [], so we need to use [ and ] instead.
58411  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58412  if test "x$has_forbidden_chars" != x; then
58413    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58414    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58415    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58416    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58417      # Going to short mode and back again did indeed matter. Since short mode is
58418      # case insensitive, let's make it lowercase to improve readability.
58419      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58420      # Now convert it back to Unix-style (cygpath)
58421      input_path=`$CYGPATH -u "$shortmode_path"`
58422      new_path="$input_path"
58423    fi
58424  fi
58425
58426  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58427  if test "x$test_cygdrive_prefix" = x; then
58428    # As a simple fix, exclude /usr/bin since it's not a real path.
58429    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58430      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58431      # a path prefixed by /cygdrive for fixpath to work.
58432      new_path="$CYGWIN_ROOT_PATH$input_path"
58433    fi
58434  fi
58435
58436
58437  if test "x$path" != "x$new_path"; then
58438    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58439    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58440$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58441  fi
58442
58443    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58444
58445  path="$POTENTIAL_FREETYPE_LIB_PATH"
58446  has_colon=`$ECHO $path | $GREP ^.:`
58447  new_path="$path"
58448  if test "x$has_colon" = x; then
58449    # Not in mixed or Windows style, start by that.
58450    new_path=`cmd //c echo $path`
58451  fi
58452
58453
58454  input_path="$new_path"
58455  # Check if we need to convert this using DOS-style short mode. If the path
58456  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58457  # take no chances and rewrite it.
58458  # Note: m4 eats our [], so we need to use [ and ] instead.
58459  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58460  if test "x$has_forbidden_chars" != x; then
58461    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58462    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58463  fi
58464
58465
58466  windows_path="$new_path"
58467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58468    unix_path=`$CYGPATH -u "$windows_path"`
58469    new_path="$unix_path"
58470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58471    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58472    new_path="$unix_path"
58473  fi
58474
58475  if test "x$path" != "x$new_path"; then
58476    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58477    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58478$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58479  fi
58480
58481  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58482  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58483
58484    else
58485      # We're on a unix platform. Hooray! :)
58486      path="$POTENTIAL_FREETYPE_LIB_PATH"
58487      has_space=`$ECHO "$path" | $GREP " "`
58488      if test "x$has_space" != x; then
58489        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58490$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58491        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58492      fi
58493
58494      # Use eval to expand a potential ~
58495      eval path="$path"
58496      if test ! -f "$path" && test ! -d "$path"; then
58497        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58498      fi
58499
58500      if test -d "$path"; then
58501        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58502      else
58503        dir="`$DIRNAME "$path"`"
58504        base="`$BASENAME "$path"`"
58505        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58506      fi
58507    fi
58508  fi
58509
58510
58511    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58512    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58513$as_echo_n "checking for freetype includes... " >&6; }
58514    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58515$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58516    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58517    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58518$as_echo_n "checking for freetype libraries... " >&6; }
58519    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58520$as_echo "$FREETYPE_LIB_PATH" >&6; }
58521  fi
58522
58523          fi
58524          if test "x$FOUND_FREETYPE" != xyes; then
58525            FREETYPE_BASE_DIR="$HOME/freetype"
58526
58527  windows_path="$FREETYPE_BASE_DIR"
58528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58529    unix_path=`$CYGPATH -u "$windows_path"`
58530    FREETYPE_BASE_DIR="$unix_path"
58531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58532    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58533    FREETYPE_BASE_DIR="$unix_path"
58534  fi
58535
58536            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58537
58538  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58539  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58540  METHOD="well-known location"
58541
58542  # Let's start with an optimistic view of the world :-)
58543  FOUND_FREETYPE=yes
58544
58545  # First look for the canonical freetype main include file ft2build.h.
58546  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58547    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58548    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58549    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58550      # Fail.
58551      FOUND_FREETYPE=no
58552    fi
58553  fi
58554
58555  if test "x$FOUND_FREETYPE" = xyes; then
58556    # Include file found, let's continue the sanity check.
58557    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58558$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58559
58560    # Reset to default value
58561    FREETYPE_BASE_NAME=freetype
58562    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58563    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58564      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58565          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58566        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58567        # for the .6 version explicitly.
58568        FREETYPE_BASE_NAME=freetype.6
58569        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58570        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58571$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58572      else
58573        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58574$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58575        FOUND_FREETYPE=no
58576      fi
58577    else
58578      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58579        # On Windows, we will need both .lib and .dll file.
58580        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58581          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58582$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58583          FOUND_FREETYPE=no
58584        fi
58585      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58586          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58587        # Found lib in isa dir, use that instead.
58588        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58589        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58590$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58591      fi
58592    fi
58593  fi
58594
58595  if test "x$FOUND_FREETYPE" = xyes; then
58596
58597  # Only process if variable expands to non-empty
58598
58599  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58600    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58601
58602  # Input might be given as Windows format, start by converting to
58603  # unix format.
58604  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58605  new_path=`$CYGPATH -u "$path"`
58606
58607  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58608  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58609  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58610  # "foo.exe" is OK but "foo" is an error.
58611  #
58612  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58613  # It is also a way to make sure we got the proper file name for the real test later on.
58614  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58615  if test "x$test_shortpath" = x; then
58616    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58617$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58618    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58619  fi
58620
58621  # Call helper function which possibly converts this using DOS-style short mode.
58622  # If so, the updated path is stored in $new_path.
58623
58624  input_path="$new_path"
58625  # Check if we need to convert this using DOS-style short mode. If the path
58626  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58627  # take no chances and rewrite it.
58628  # Note: m4 eats our [], so we need to use [ and ] instead.
58629  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58630  if test "x$has_forbidden_chars" != x; then
58631    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58632    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58633    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58634    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58635      # Going to short mode and back again did indeed matter. Since short mode is
58636      # case insensitive, let's make it lowercase to improve readability.
58637      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58638      # Now convert it back to Unix-style (cygpath)
58639      input_path=`$CYGPATH -u "$shortmode_path"`
58640      new_path="$input_path"
58641    fi
58642  fi
58643
58644  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58645  if test "x$test_cygdrive_prefix" = x; then
58646    # As a simple fix, exclude /usr/bin since it's not a real path.
58647    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58648      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58649      # a path prefixed by /cygdrive for fixpath to work.
58650      new_path="$CYGWIN_ROOT_PATH$input_path"
58651    fi
58652  fi
58653
58654
58655  if test "x$path" != "x$new_path"; then
58656    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58657    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58658$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58659  fi
58660
58661    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58662
58663  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58664  has_colon=`$ECHO $path | $GREP ^.:`
58665  new_path="$path"
58666  if test "x$has_colon" = x; then
58667    # Not in mixed or Windows style, start by that.
58668    new_path=`cmd //c echo $path`
58669  fi
58670
58671
58672  input_path="$new_path"
58673  # Check if we need to convert this using DOS-style short mode. If the path
58674  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58675  # take no chances and rewrite it.
58676  # Note: m4 eats our [], so we need to use [ and ] instead.
58677  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58678  if test "x$has_forbidden_chars" != x; then
58679    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58680    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58681  fi
58682
58683
58684  windows_path="$new_path"
58685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58686    unix_path=`$CYGPATH -u "$windows_path"`
58687    new_path="$unix_path"
58688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58689    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58690    new_path="$unix_path"
58691  fi
58692
58693  if test "x$path" != "x$new_path"; then
58694    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58695    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58696$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58697  fi
58698
58699  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58700  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58701
58702    else
58703      # We're on a unix platform. Hooray! :)
58704      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58705      has_space=`$ECHO "$path" | $GREP " "`
58706      if test "x$has_space" != x; then
58707        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58708$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58709        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58710      fi
58711
58712      # Use eval to expand a potential ~
58713      eval path="$path"
58714      if test ! -f "$path" && test ! -d "$path"; then
58715        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58716      fi
58717
58718      if test -d "$path"; then
58719        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58720      else
58721        dir="`$DIRNAME "$path"`"
58722        base="`$BASENAME "$path"`"
58723        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58724      fi
58725    fi
58726  fi
58727
58728
58729  # Only process if variable expands to non-empty
58730
58731  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58732    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58733
58734  # Input might be given as Windows format, start by converting to
58735  # unix format.
58736  path="$POTENTIAL_FREETYPE_LIB_PATH"
58737  new_path=`$CYGPATH -u "$path"`
58738
58739  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58740  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58741  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58742  # "foo.exe" is OK but "foo" is an error.
58743  #
58744  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58745  # It is also a way to make sure we got the proper file name for the real test later on.
58746  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58747  if test "x$test_shortpath" = x; then
58748    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58749$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58750    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58751  fi
58752
58753  # Call helper function which possibly converts this using DOS-style short mode.
58754  # If so, the updated path is stored in $new_path.
58755
58756  input_path="$new_path"
58757  # Check if we need to convert this using DOS-style short mode. If the path
58758  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58759  # take no chances and rewrite it.
58760  # Note: m4 eats our [], so we need to use [ and ] instead.
58761  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58762  if test "x$has_forbidden_chars" != x; then
58763    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58764    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58765    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58766    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58767      # Going to short mode and back again did indeed matter. Since short mode is
58768      # case insensitive, let's make it lowercase to improve readability.
58769      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58770      # Now convert it back to Unix-style (cygpath)
58771      input_path=`$CYGPATH -u "$shortmode_path"`
58772      new_path="$input_path"
58773    fi
58774  fi
58775
58776  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58777  if test "x$test_cygdrive_prefix" = x; then
58778    # As a simple fix, exclude /usr/bin since it's not a real path.
58779    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58780      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58781      # a path prefixed by /cygdrive for fixpath to work.
58782      new_path="$CYGWIN_ROOT_PATH$input_path"
58783    fi
58784  fi
58785
58786
58787  if test "x$path" != "x$new_path"; then
58788    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58789    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58790$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58791  fi
58792
58793    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58794
58795  path="$POTENTIAL_FREETYPE_LIB_PATH"
58796  has_colon=`$ECHO $path | $GREP ^.:`
58797  new_path="$path"
58798  if test "x$has_colon" = x; then
58799    # Not in mixed or Windows style, start by that.
58800    new_path=`cmd //c echo $path`
58801  fi
58802
58803
58804  input_path="$new_path"
58805  # Check if we need to convert this using DOS-style short mode. If the path
58806  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58807  # take no chances and rewrite it.
58808  # Note: m4 eats our [], so we need to use [ and ] instead.
58809  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58810  if test "x$has_forbidden_chars" != x; then
58811    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58812    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58813  fi
58814
58815
58816  windows_path="$new_path"
58817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58818    unix_path=`$CYGPATH -u "$windows_path"`
58819    new_path="$unix_path"
58820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58821    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58822    new_path="$unix_path"
58823  fi
58824
58825  if test "x$path" != "x$new_path"; then
58826    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58827    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58828$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58829  fi
58830
58831  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58832  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58833
58834    else
58835      # We're on a unix platform. Hooray! :)
58836      path="$POTENTIAL_FREETYPE_LIB_PATH"
58837      has_space=`$ECHO "$path" | $GREP " "`
58838      if test "x$has_space" != x; then
58839        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58840$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58841        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58842      fi
58843
58844      # Use eval to expand a potential ~
58845      eval path="$path"
58846      if test ! -f "$path" && test ! -d "$path"; then
58847        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58848      fi
58849
58850      if test -d "$path"; then
58851        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58852      else
58853        dir="`$DIRNAME "$path"`"
58854        base="`$BASENAME "$path"`"
58855        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58856      fi
58857    fi
58858  fi
58859
58860
58861    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58862    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58863$as_echo_n "checking for freetype includes... " >&6; }
58864    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58865$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58866    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58867    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58868$as_echo_n "checking for freetype libraries... " >&6; }
58869    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58870$as_echo "$FREETYPE_LIB_PATH" >&6; }
58871  fi
58872
58873            else
58874
58875  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58876  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
58877  METHOD="well-known location"
58878
58879  # Let's start with an optimistic view of the world :-)
58880  FOUND_FREETYPE=yes
58881
58882  # First look for the canonical freetype main include file ft2build.h.
58883  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58884    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58885    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58886    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58887      # Fail.
58888      FOUND_FREETYPE=no
58889    fi
58890  fi
58891
58892  if test "x$FOUND_FREETYPE" = xyes; then
58893    # Include file found, let's continue the sanity check.
58894    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58895$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58896
58897    # Reset to default value
58898    FREETYPE_BASE_NAME=freetype
58899    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58900    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58901      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58902          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58903        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58904        # for the .6 version explicitly.
58905        FREETYPE_BASE_NAME=freetype.6
58906        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58907        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58908$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58909      else
58910        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58911$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58912        FOUND_FREETYPE=no
58913      fi
58914    else
58915      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58916        # On Windows, we will need both .lib and .dll file.
58917        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58918          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58919$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58920          FOUND_FREETYPE=no
58921        fi
58922      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58923          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58924        # Found lib in isa dir, use that instead.
58925        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58926        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58927$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58928      fi
58929    fi
58930  fi
58931
58932  if test "x$FOUND_FREETYPE" = xyes; then
58933
58934  # Only process if variable expands to non-empty
58935
58936  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58937    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58938
58939  # Input might be given as Windows format, start by converting to
58940  # unix format.
58941  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58942  new_path=`$CYGPATH -u "$path"`
58943
58944  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58945  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58946  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58947  # "foo.exe" is OK but "foo" is an error.
58948  #
58949  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58950  # It is also a way to make sure we got the proper file name for the real test later on.
58951  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58952  if test "x$test_shortpath" = x; then
58953    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58954$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58955    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58956  fi
58957
58958  # Call helper function which possibly converts this using DOS-style short mode.
58959  # If so, the updated path is stored in $new_path.
58960
58961  input_path="$new_path"
58962  # Check if we need to convert this using DOS-style short mode. If the path
58963  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58964  # take no chances and rewrite it.
58965  # Note: m4 eats our [], so we need to use [ and ] instead.
58966  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58967  if test "x$has_forbidden_chars" != x; then
58968    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58969    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58970    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58971    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58972      # Going to short mode and back again did indeed matter. Since short mode is
58973      # case insensitive, let's make it lowercase to improve readability.
58974      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58975      # Now convert it back to Unix-style (cygpath)
58976      input_path=`$CYGPATH -u "$shortmode_path"`
58977      new_path="$input_path"
58978    fi
58979  fi
58980
58981  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58982  if test "x$test_cygdrive_prefix" = x; then
58983    # As a simple fix, exclude /usr/bin since it's not a real path.
58984    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58985      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58986      # a path prefixed by /cygdrive for fixpath to work.
58987      new_path="$CYGWIN_ROOT_PATH$input_path"
58988    fi
58989  fi
58990
58991
58992  if test "x$path" != "x$new_path"; then
58993    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58994    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58995$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58996  fi
58997
58998    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58999
59000  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59001  has_colon=`$ECHO $path | $GREP ^.:`
59002  new_path="$path"
59003  if test "x$has_colon" = x; then
59004    # Not in mixed or Windows style, start by that.
59005    new_path=`cmd //c echo $path`
59006  fi
59007
59008
59009  input_path="$new_path"
59010  # Check if we need to convert this using DOS-style short mode. If the path
59011  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59012  # take no chances and rewrite it.
59013  # Note: m4 eats our [], so we need to use [ and ] instead.
59014  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59015  if test "x$has_forbidden_chars" != x; then
59016    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59017    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59018  fi
59019
59020
59021  windows_path="$new_path"
59022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59023    unix_path=`$CYGPATH -u "$windows_path"`
59024    new_path="$unix_path"
59025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59027    new_path="$unix_path"
59028  fi
59029
59030  if test "x$path" != "x$new_path"; then
59031    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59032    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59033$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59034  fi
59035
59036  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59037  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59038
59039    else
59040      # We're on a unix platform. Hooray! :)
59041      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59042      has_space=`$ECHO "$path" | $GREP " "`
59043      if test "x$has_space" != x; then
59044        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59045$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59046        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59047      fi
59048
59049      # Use eval to expand a potential ~
59050      eval path="$path"
59051      if test ! -f "$path" && test ! -d "$path"; then
59052        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59053      fi
59054
59055      if test -d "$path"; then
59056        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59057      else
59058        dir="`$DIRNAME "$path"`"
59059        base="`$BASENAME "$path"`"
59060        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59061      fi
59062    fi
59063  fi
59064
59065
59066  # Only process if variable expands to non-empty
59067
59068  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59069    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59070
59071  # Input might be given as Windows format, start by converting to
59072  # unix format.
59073  path="$POTENTIAL_FREETYPE_LIB_PATH"
59074  new_path=`$CYGPATH -u "$path"`
59075
59076  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59077  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59078  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59079  # "foo.exe" is OK but "foo" is an error.
59080  #
59081  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59082  # It is also a way to make sure we got the proper file name for the real test later on.
59083  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59084  if test "x$test_shortpath" = x; then
59085    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59086$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59087    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59088  fi
59089
59090  # Call helper function which possibly converts this using DOS-style short mode.
59091  # If so, the updated path is stored in $new_path.
59092
59093  input_path="$new_path"
59094  # Check if we need to convert this using DOS-style short mode. If the path
59095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59096  # take no chances and rewrite it.
59097  # Note: m4 eats our [], so we need to use [ and ] instead.
59098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59099  if test "x$has_forbidden_chars" != x; then
59100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59101    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59102    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59103    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59104      # Going to short mode and back again did indeed matter. Since short mode is
59105      # case insensitive, let's make it lowercase to improve readability.
59106      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59107      # Now convert it back to Unix-style (cygpath)
59108      input_path=`$CYGPATH -u "$shortmode_path"`
59109      new_path="$input_path"
59110    fi
59111  fi
59112
59113  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59114  if test "x$test_cygdrive_prefix" = x; then
59115    # As a simple fix, exclude /usr/bin since it's not a real path.
59116    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59117      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59118      # a path prefixed by /cygdrive for fixpath to work.
59119      new_path="$CYGWIN_ROOT_PATH$input_path"
59120    fi
59121  fi
59122
59123
59124  if test "x$path" != "x$new_path"; then
59125    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59126    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59127$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59128  fi
59129
59130    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59131
59132  path="$POTENTIAL_FREETYPE_LIB_PATH"
59133  has_colon=`$ECHO $path | $GREP ^.:`
59134  new_path="$path"
59135  if test "x$has_colon" = x; then
59136    # Not in mixed or Windows style, start by that.
59137    new_path=`cmd //c echo $path`
59138  fi
59139
59140
59141  input_path="$new_path"
59142  # Check if we need to convert this using DOS-style short mode. If the path
59143  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59144  # take no chances and rewrite it.
59145  # Note: m4 eats our [], so we need to use [ and ] instead.
59146  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59147  if test "x$has_forbidden_chars" != x; then
59148    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59149    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59150  fi
59151
59152
59153  windows_path="$new_path"
59154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59155    unix_path=`$CYGPATH -u "$windows_path"`
59156    new_path="$unix_path"
59157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59159    new_path="$unix_path"
59160  fi
59161
59162  if test "x$path" != "x$new_path"; then
59163    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59164    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59165$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59166  fi
59167
59168  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59169  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59170
59171    else
59172      # We're on a unix platform. Hooray! :)
59173      path="$POTENTIAL_FREETYPE_LIB_PATH"
59174      has_space=`$ECHO "$path" | $GREP " "`
59175      if test "x$has_space" != x; then
59176        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59177$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59178        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59179      fi
59180
59181      # Use eval to expand a potential ~
59182      eval path="$path"
59183      if test ! -f "$path" && test ! -d "$path"; then
59184        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59185      fi
59186
59187      if test -d "$path"; then
59188        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59189      else
59190        dir="`$DIRNAME "$path"`"
59191        base="`$BASENAME "$path"`"
59192        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59193      fi
59194    fi
59195  fi
59196
59197
59198    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59199    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59200$as_echo_n "checking for freetype includes... " >&6; }
59201    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59202$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59203    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59204    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59205$as_echo_n "checking for freetype libraries... " >&6; }
59206    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59207$as_echo "$FREETYPE_LIB_PATH" >&6; }
59208  fi
59209
59210            fi
59211            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59212                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59213              # Source is available, as a last resort try to build freetype in default location
59214
59215  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59216  BUILD_FREETYPE=yes
59217
59218  # Check if the freetype sources are acessible..
59219  if ! test -d $FREETYPE_SRC_PATH; then
59220    { $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
59221$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59222    BUILD_FREETYPE=no
59223  fi
59224  # ..and contain a vc2010 project file
59225  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59226  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59227    { $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
59228$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59229    BUILD_FREETYPE=no
59230  fi
59231  # Now check if configure found a version of 'msbuild.exe'
59232  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59233    { $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
59234$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;}
59235    BUILD_FREETYPE=no
59236  fi
59237
59238  # Ready to go..
59239  if test "x$BUILD_FREETYPE" = xyes; then
59240    # msbuild requires trailing slashes for output directories
59241    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59242    freetype_lib_path_unix="$freetype_lib_path"
59243    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59244
59245  unix_path="$vcxproj_path"
59246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59247    windows_path=`$CYGPATH -m "$unix_path"`
59248    vcxproj_path="$windows_path"
59249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59250    windows_path=`cmd //c echo $unix_path`
59251    vcxproj_path="$windows_path"
59252  fi
59253
59254
59255  unix_path="$freetype_lib_path"
59256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59257    windows_path=`$CYGPATH -m "$unix_path"`
59258    freetype_lib_path="$windows_path"
59259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59260    windows_path=`cmd //c echo $unix_path`
59261    freetype_lib_path="$windows_path"
59262  fi
59263
59264
59265  unix_path="$freetype_obj_path"
59266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59267    windows_path=`$CYGPATH -m "$unix_path"`
59268    freetype_obj_path="$windows_path"
59269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59270    windows_path=`cmd //c echo $unix_path`
59271    freetype_obj_path="$windows_path"
59272  fi
59273
59274    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59275      freetype_platform=x64
59276    else
59277      freetype_platform=win32
59278    fi
59279
59280    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59281    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59282    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59283    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59284    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59285$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59286
59287    # First we try to build the freetype.dll
59288    $ECHO -e "@echo off\n"\
59289        "$MSBUILD $vcxproj_path "\
59290        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59291        "/p:Configuration=\"Release Multithreaded\" "\
59292        "/p:Platform=$freetype_platform "\
59293        "/p:ConfigurationType=DynamicLibrary "\
59294        "/p:TargetName=freetype "\
59295        "/p:OutDir=\"$freetype_lib_path\" "\
59296        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59297    cmd /c freetype.bat
59298
59299    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59300      # If that succeeds we also build freetype.lib
59301      $ECHO -e "@echo off\n"\
59302          "$MSBUILD $vcxproj_path "\
59303          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59304          "/p:Configuration=\"Release Multithreaded\" "\
59305          "/p:Platform=$freetype_platform "\
59306          "/p:ConfigurationType=StaticLibrary "\
59307          "/p:TargetName=freetype "\
59308          "/p:OutDir=\"$freetype_lib_path\" "\
59309          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59310      cmd /c freetype.bat
59311
59312      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59313        # Once we build both, lib and dll, set freetype lib and include path appropriately
59314        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59315        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59316        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59317$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59318      else
59319        BUILD_FREETYPE=no
59320      fi
59321    else
59322      BUILD_FREETYPE=no
59323    fi
59324  fi
59325
59326              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59327
59328  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59329  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59330  METHOD="well-known location"
59331
59332  # Let's start with an optimistic view of the world :-)
59333  FOUND_FREETYPE=yes
59334
59335  # First look for the canonical freetype main include file ft2build.h.
59336  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59337    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59338    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59339    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59340      # Fail.
59341      FOUND_FREETYPE=no
59342    fi
59343  fi
59344
59345  if test "x$FOUND_FREETYPE" = xyes; then
59346    # Include file found, let's continue the sanity check.
59347    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59348$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59349
59350    # Reset to default value
59351    FREETYPE_BASE_NAME=freetype
59352    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59353    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59354      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59355          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59356        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59357        # for the .6 version explicitly.
59358        FREETYPE_BASE_NAME=freetype.6
59359        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59360        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59361$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59362      else
59363        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59364$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59365        FOUND_FREETYPE=no
59366      fi
59367    else
59368      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59369        # On Windows, we will need both .lib and .dll file.
59370        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59371          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59372$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59373          FOUND_FREETYPE=no
59374        fi
59375      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59376          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59377        # Found lib in isa dir, use that instead.
59378        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59379        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59380$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59381      fi
59382    fi
59383  fi
59384
59385  if test "x$FOUND_FREETYPE" = xyes; then
59386
59387  # Only process if variable expands to non-empty
59388
59389  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59390    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59391
59392  # Input might be given as Windows format, start by converting to
59393  # unix format.
59394  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59395  new_path=`$CYGPATH -u "$path"`
59396
59397  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59398  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59399  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59400  # "foo.exe" is OK but "foo" is an error.
59401  #
59402  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59403  # It is also a way to make sure we got the proper file name for the real test later on.
59404  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59405  if test "x$test_shortpath" = x; then
59406    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59407$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59408    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59409  fi
59410
59411  # Call helper function which possibly converts this using DOS-style short mode.
59412  # If so, the updated path is stored in $new_path.
59413
59414  input_path="$new_path"
59415  # Check if we need to convert this using DOS-style short mode. If the path
59416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59417  # take no chances and rewrite it.
59418  # Note: m4 eats our [], so we need to use [ and ] instead.
59419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59420  if test "x$has_forbidden_chars" != x; then
59421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59422    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59423    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59424    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59425      # Going to short mode and back again did indeed matter. Since short mode is
59426      # case insensitive, let's make it lowercase to improve readability.
59427      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59428      # Now convert it back to Unix-style (cygpath)
59429      input_path=`$CYGPATH -u "$shortmode_path"`
59430      new_path="$input_path"
59431    fi
59432  fi
59433
59434  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59435  if test "x$test_cygdrive_prefix" = x; then
59436    # As a simple fix, exclude /usr/bin since it's not a real path.
59437    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59438      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59439      # a path prefixed by /cygdrive for fixpath to work.
59440      new_path="$CYGWIN_ROOT_PATH$input_path"
59441    fi
59442  fi
59443
59444
59445  if test "x$path" != "x$new_path"; then
59446    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59447    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59448$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59449  fi
59450
59451    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59452
59453  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59454  has_colon=`$ECHO $path | $GREP ^.:`
59455  new_path="$path"
59456  if test "x$has_colon" = x; then
59457    # Not in mixed or Windows style, start by that.
59458    new_path=`cmd //c echo $path`
59459  fi
59460
59461
59462  input_path="$new_path"
59463  # Check if we need to convert this using DOS-style short mode. If the path
59464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59465  # take no chances and rewrite it.
59466  # Note: m4 eats our [], so we need to use [ and ] instead.
59467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59468  if test "x$has_forbidden_chars" != x; then
59469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59470    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59471  fi
59472
59473
59474  windows_path="$new_path"
59475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59476    unix_path=`$CYGPATH -u "$windows_path"`
59477    new_path="$unix_path"
59478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59480    new_path="$unix_path"
59481  fi
59482
59483  if test "x$path" != "x$new_path"; then
59484    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59485    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59486$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59487  fi
59488
59489  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59490  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59491
59492    else
59493      # We're on a unix platform. Hooray! :)
59494      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59495      has_space=`$ECHO "$path" | $GREP " "`
59496      if test "x$has_space" != x; then
59497        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59498$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59499        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59500      fi
59501
59502      # Use eval to expand a potential ~
59503      eval path="$path"
59504      if test ! -f "$path" && test ! -d "$path"; then
59505        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59506      fi
59507
59508      if test -d "$path"; then
59509        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59510      else
59511        dir="`$DIRNAME "$path"`"
59512        base="`$BASENAME "$path"`"
59513        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59514      fi
59515    fi
59516  fi
59517
59518
59519  # Only process if variable expands to non-empty
59520
59521  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59522    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59523
59524  # Input might be given as Windows format, start by converting to
59525  # unix format.
59526  path="$POTENTIAL_FREETYPE_LIB_PATH"
59527  new_path=`$CYGPATH -u "$path"`
59528
59529  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59530  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59531  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59532  # "foo.exe" is OK but "foo" is an error.
59533  #
59534  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59535  # It is also a way to make sure we got the proper file name for the real test later on.
59536  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59537  if test "x$test_shortpath" = x; then
59538    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59539$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59540    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59541  fi
59542
59543  # Call helper function which possibly converts this using DOS-style short mode.
59544  # If so, the updated path is stored in $new_path.
59545
59546  input_path="$new_path"
59547  # Check if we need to convert this using DOS-style short mode. If the path
59548  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59549  # take no chances and rewrite it.
59550  # Note: m4 eats our [], so we need to use [ and ] instead.
59551  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59552  if test "x$has_forbidden_chars" != x; then
59553    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59554    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59555    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59556    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59557      # Going to short mode and back again did indeed matter. Since short mode is
59558      # case insensitive, let's make it lowercase to improve readability.
59559      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59560      # Now convert it back to Unix-style (cygpath)
59561      input_path=`$CYGPATH -u "$shortmode_path"`
59562      new_path="$input_path"
59563    fi
59564  fi
59565
59566  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59567  if test "x$test_cygdrive_prefix" = x; then
59568    # As a simple fix, exclude /usr/bin since it's not a real path.
59569    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59570      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59571      # a path prefixed by /cygdrive for fixpath to work.
59572      new_path="$CYGWIN_ROOT_PATH$input_path"
59573    fi
59574  fi
59575
59576
59577  if test "x$path" != "x$new_path"; then
59578    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59579    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59580$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59581  fi
59582
59583    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59584
59585  path="$POTENTIAL_FREETYPE_LIB_PATH"
59586  has_colon=`$ECHO $path | $GREP ^.:`
59587  new_path="$path"
59588  if test "x$has_colon" = x; then
59589    # Not in mixed or Windows style, start by that.
59590    new_path=`cmd //c echo $path`
59591  fi
59592
59593
59594  input_path="$new_path"
59595  # Check if we need to convert this using DOS-style short mode. If the path
59596  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59597  # take no chances and rewrite it.
59598  # Note: m4 eats our [], so we need to use [ and ] instead.
59599  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59600  if test "x$has_forbidden_chars" != x; then
59601    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59602    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59603  fi
59604
59605
59606  windows_path="$new_path"
59607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59608    unix_path=`$CYGPATH -u "$windows_path"`
59609    new_path="$unix_path"
59610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59611    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59612    new_path="$unix_path"
59613  fi
59614
59615  if test "x$path" != "x$new_path"; then
59616    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59617    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59618$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59619  fi
59620
59621  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59622  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59623
59624    else
59625      # We're on a unix platform. Hooray! :)
59626      path="$POTENTIAL_FREETYPE_LIB_PATH"
59627      has_space=`$ECHO "$path" | $GREP " "`
59628      if test "x$has_space" != x; then
59629        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59630$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59631        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59632      fi
59633
59634      # Use eval to expand a potential ~
59635      eval path="$path"
59636      if test ! -f "$path" && test ! -d "$path"; then
59637        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59638      fi
59639
59640      if test -d "$path"; then
59641        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59642      else
59643        dir="`$DIRNAME "$path"`"
59644        base="`$BASENAME "$path"`"
59645        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59646      fi
59647    fi
59648  fi
59649
59650
59651    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59652    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59653$as_echo_n "checking for freetype includes... " >&6; }
59654    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59655$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59656    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59657    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59658$as_echo_n "checking for freetype libraries... " >&6; }
59659    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59660$as_echo "$FREETYPE_LIB_PATH" >&6; }
59661  fi
59662
59663              else
59664
59665  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59666  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59667  METHOD="well-known location"
59668
59669  # Let's start with an optimistic view of the world :-)
59670  FOUND_FREETYPE=yes
59671
59672  # First look for the canonical freetype main include file ft2build.h.
59673  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59674    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59675    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59676    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59677      # Fail.
59678      FOUND_FREETYPE=no
59679    fi
59680  fi
59681
59682  if test "x$FOUND_FREETYPE" = xyes; then
59683    # Include file found, let's continue the sanity check.
59684    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59685$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59686
59687    # Reset to default value
59688    FREETYPE_BASE_NAME=freetype
59689    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59690    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59691      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59692          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59693        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59694        # for the .6 version explicitly.
59695        FREETYPE_BASE_NAME=freetype.6
59696        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59697        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59698$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59699      else
59700        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59701$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59702        FOUND_FREETYPE=no
59703      fi
59704    else
59705      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59706        # On Windows, we will need both .lib and .dll file.
59707        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59708          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59709$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59710          FOUND_FREETYPE=no
59711        fi
59712      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59713          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59714        # Found lib in isa dir, use that instead.
59715        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59716        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59717$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59718      fi
59719    fi
59720  fi
59721
59722  if test "x$FOUND_FREETYPE" = xyes; then
59723
59724  # Only process if variable expands to non-empty
59725
59726  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59727    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59728
59729  # Input might be given as Windows format, start by converting to
59730  # unix format.
59731  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59732  new_path=`$CYGPATH -u "$path"`
59733
59734  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59735  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59736  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59737  # "foo.exe" is OK but "foo" is an error.
59738  #
59739  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59740  # It is also a way to make sure we got the proper file name for the real test later on.
59741  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59742  if test "x$test_shortpath" = x; then
59743    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59744$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59745    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59746  fi
59747
59748  # Call helper function which possibly converts this using DOS-style short mode.
59749  # If so, the updated path is stored in $new_path.
59750
59751  input_path="$new_path"
59752  # Check if we need to convert this using DOS-style short mode. If the path
59753  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59754  # take no chances and rewrite it.
59755  # Note: m4 eats our [], so we need to use [ and ] instead.
59756  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59757  if test "x$has_forbidden_chars" != x; then
59758    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59759    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59760    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59761    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59762      # Going to short mode and back again did indeed matter. Since short mode is
59763      # case insensitive, let's make it lowercase to improve readability.
59764      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59765      # Now convert it back to Unix-style (cygpath)
59766      input_path=`$CYGPATH -u "$shortmode_path"`
59767      new_path="$input_path"
59768    fi
59769  fi
59770
59771  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59772  if test "x$test_cygdrive_prefix" = x; then
59773    # As a simple fix, exclude /usr/bin since it's not a real path.
59774    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59775      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59776      # a path prefixed by /cygdrive for fixpath to work.
59777      new_path="$CYGWIN_ROOT_PATH$input_path"
59778    fi
59779  fi
59780
59781
59782  if test "x$path" != "x$new_path"; then
59783    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59784    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59785$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59786  fi
59787
59788    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59789
59790  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59791  has_colon=`$ECHO $path | $GREP ^.:`
59792  new_path="$path"
59793  if test "x$has_colon" = x; then
59794    # Not in mixed or Windows style, start by that.
59795    new_path=`cmd //c echo $path`
59796  fi
59797
59798
59799  input_path="$new_path"
59800  # Check if we need to convert this using DOS-style short mode. If the path
59801  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59802  # take no chances and rewrite it.
59803  # Note: m4 eats our [], so we need to use [ and ] instead.
59804  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59805  if test "x$has_forbidden_chars" != x; then
59806    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59807    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59808  fi
59809
59810
59811  windows_path="$new_path"
59812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59813    unix_path=`$CYGPATH -u "$windows_path"`
59814    new_path="$unix_path"
59815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59816    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59817    new_path="$unix_path"
59818  fi
59819
59820  if test "x$path" != "x$new_path"; then
59821    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59822    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59823$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59824  fi
59825
59826  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59827  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59828
59829    else
59830      # We're on a unix platform. Hooray! :)
59831      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59832      has_space=`$ECHO "$path" | $GREP " "`
59833      if test "x$has_space" != x; then
59834        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59835$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59836        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59837      fi
59838
59839      # Use eval to expand a potential ~
59840      eval path="$path"
59841      if test ! -f "$path" && test ! -d "$path"; then
59842        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59843      fi
59844
59845      if test -d "$path"; then
59846        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59847      else
59848        dir="`$DIRNAME "$path"`"
59849        base="`$BASENAME "$path"`"
59850        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59851      fi
59852    fi
59853  fi
59854
59855
59856  # Only process if variable expands to non-empty
59857
59858  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59859    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59860
59861  # Input might be given as Windows format, start by converting to
59862  # unix format.
59863  path="$POTENTIAL_FREETYPE_LIB_PATH"
59864  new_path=`$CYGPATH -u "$path"`
59865
59866  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59867  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59868  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59869  # "foo.exe" is OK but "foo" is an error.
59870  #
59871  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59872  # It is also a way to make sure we got the proper file name for the real test later on.
59873  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59874  if test "x$test_shortpath" = x; then
59875    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59876$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59877    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59878  fi
59879
59880  # Call helper function which possibly converts this using DOS-style short mode.
59881  # If so, the updated path is stored in $new_path.
59882
59883  input_path="$new_path"
59884  # Check if we need to convert this using DOS-style short mode. If the path
59885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59886  # take no chances and rewrite it.
59887  # Note: m4 eats our [], so we need to use [ and ] instead.
59888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59889  if test "x$has_forbidden_chars" != x; then
59890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59891    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59892    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59893    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59894      # Going to short mode and back again did indeed matter. Since short mode is
59895      # case insensitive, let's make it lowercase to improve readability.
59896      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59897      # Now convert it back to Unix-style (cygpath)
59898      input_path=`$CYGPATH -u "$shortmode_path"`
59899      new_path="$input_path"
59900    fi
59901  fi
59902
59903  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59904  if test "x$test_cygdrive_prefix" = x; then
59905    # As a simple fix, exclude /usr/bin since it's not a real path.
59906    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59907      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59908      # a path prefixed by /cygdrive for fixpath to work.
59909      new_path="$CYGWIN_ROOT_PATH$input_path"
59910    fi
59911  fi
59912
59913
59914  if test "x$path" != "x$new_path"; then
59915    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59916    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59917$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59918  fi
59919
59920    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59921
59922  path="$POTENTIAL_FREETYPE_LIB_PATH"
59923  has_colon=`$ECHO $path | $GREP ^.:`
59924  new_path="$path"
59925  if test "x$has_colon" = x; then
59926    # Not in mixed or Windows style, start by that.
59927    new_path=`cmd //c echo $path`
59928  fi
59929
59930
59931  input_path="$new_path"
59932  # Check if we need to convert this using DOS-style short mode. If the path
59933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59934  # take no chances and rewrite it.
59935  # Note: m4 eats our [], so we need to use [ and ] instead.
59936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59937  if test "x$has_forbidden_chars" != x; then
59938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59939    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59940  fi
59941
59942
59943  windows_path="$new_path"
59944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59945    unix_path=`$CYGPATH -u "$windows_path"`
59946    new_path="$unix_path"
59947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59949    new_path="$unix_path"
59950  fi
59951
59952  if test "x$path" != "x$new_path"; then
59953    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59954    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59955$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59956  fi
59957
59958  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59959  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59960
59961    else
59962      # We're on a unix platform. Hooray! :)
59963      path="$POTENTIAL_FREETYPE_LIB_PATH"
59964      has_space=`$ECHO "$path" | $GREP " "`
59965      if test "x$has_space" != x; then
59966        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59967$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59968        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59969      fi
59970
59971      # Use eval to expand a potential ~
59972      eval path="$path"
59973      if test ! -f "$path" && test ! -d "$path"; then
59974        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59975      fi
59976
59977      if test -d "$path"; then
59978        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59979      else
59980        dir="`$DIRNAME "$path"`"
59981        base="`$BASENAME "$path"`"
59982        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59983      fi
59984    fi
59985  fi
59986
59987
59988    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59989    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59990$as_echo_n "checking for freetype includes... " >&6; }
59991    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59992$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59993    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59994    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59995$as_echo_n "checking for freetype libraries... " >&6; }
59996    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59997$as_echo "$FREETYPE_LIB_PATH" >&6; }
59998  fi
59999
60000              fi
60001            fi
60002          fi
60003        else
60004          FREETYPE_BASE_DIR="$SYSROOT/usr"
60005
60006  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60007  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60008  METHOD="well-known location"
60009
60010  # Let's start with an optimistic view of the world :-)
60011  FOUND_FREETYPE=yes
60012
60013  # First look for the canonical freetype main include file ft2build.h.
60014  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60015    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60016    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60017    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60018      # Fail.
60019      FOUND_FREETYPE=no
60020    fi
60021  fi
60022
60023  if test "x$FOUND_FREETYPE" = xyes; then
60024    # Include file found, let's continue the sanity check.
60025    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60026$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60027
60028    # Reset to default value
60029    FREETYPE_BASE_NAME=freetype
60030    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60031    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60032      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60033          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60034        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60035        # for the .6 version explicitly.
60036        FREETYPE_BASE_NAME=freetype.6
60037        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60038        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60039$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60040      else
60041        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60042$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60043        FOUND_FREETYPE=no
60044      fi
60045    else
60046      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60047        # On Windows, we will need both .lib and .dll file.
60048        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60049          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60050$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60051          FOUND_FREETYPE=no
60052        fi
60053      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60054          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60055        # Found lib in isa dir, use that instead.
60056        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60057        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60058$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60059      fi
60060    fi
60061  fi
60062
60063  if test "x$FOUND_FREETYPE" = xyes; then
60064
60065  # Only process if variable expands to non-empty
60066
60067  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60068    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60069
60070  # Input might be given as Windows format, start by converting to
60071  # unix format.
60072  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60073  new_path=`$CYGPATH -u "$path"`
60074
60075  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60076  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60077  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60078  # "foo.exe" is OK but "foo" is an error.
60079  #
60080  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60081  # It is also a way to make sure we got the proper file name for the real test later on.
60082  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60083  if test "x$test_shortpath" = x; then
60084    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60085$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60086    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60087  fi
60088
60089  # Call helper function which possibly converts this using DOS-style short mode.
60090  # If so, the updated path is stored in $new_path.
60091
60092  input_path="$new_path"
60093  # Check if we need to convert this using DOS-style short mode. If the path
60094  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60095  # take no chances and rewrite it.
60096  # Note: m4 eats our [], so we need to use [ and ] instead.
60097  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60098  if test "x$has_forbidden_chars" != x; then
60099    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60100    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60101    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60102    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60103      # Going to short mode and back again did indeed matter. Since short mode is
60104      # case insensitive, let's make it lowercase to improve readability.
60105      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60106      # Now convert it back to Unix-style (cygpath)
60107      input_path=`$CYGPATH -u "$shortmode_path"`
60108      new_path="$input_path"
60109    fi
60110  fi
60111
60112  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60113  if test "x$test_cygdrive_prefix" = x; then
60114    # As a simple fix, exclude /usr/bin since it's not a real path.
60115    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60116      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60117      # a path prefixed by /cygdrive for fixpath to work.
60118      new_path="$CYGWIN_ROOT_PATH$input_path"
60119    fi
60120  fi
60121
60122
60123  if test "x$path" != "x$new_path"; then
60124    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60125    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60126$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60127  fi
60128
60129    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60130
60131  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60132  has_colon=`$ECHO $path | $GREP ^.:`
60133  new_path="$path"
60134  if test "x$has_colon" = x; then
60135    # Not in mixed or Windows style, start by that.
60136    new_path=`cmd //c echo $path`
60137  fi
60138
60139
60140  input_path="$new_path"
60141  # Check if we need to convert this using DOS-style short mode. If the path
60142  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60143  # take no chances and rewrite it.
60144  # Note: m4 eats our [], so we need to use [ and ] instead.
60145  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60146  if test "x$has_forbidden_chars" != x; then
60147    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60148    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60149  fi
60150
60151
60152  windows_path="$new_path"
60153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60154    unix_path=`$CYGPATH -u "$windows_path"`
60155    new_path="$unix_path"
60156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60158    new_path="$unix_path"
60159  fi
60160
60161  if test "x$path" != "x$new_path"; then
60162    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60163    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60164$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60165  fi
60166
60167  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60168  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60169
60170    else
60171      # We're on a unix platform. Hooray! :)
60172      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60173      has_space=`$ECHO "$path" | $GREP " "`
60174      if test "x$has_space" != x; then
60175        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60176$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60177        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60178      fi
60179
60180      # Use eval to expand a potential ~
60181      eval path="$path"
60182      if test ! -f "$path" && test ! -d "$path"; then
60183        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60184      fi
60185
60186      if test -d "$path"; then
60187        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60188      else
60189        dir="`$DIRNAME "$path"`"
60190        base="`$BASENAME "$path"`"
60191        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60192      fi
60193    fi
60194  fi
60195
60196
60197  # Only process if variable expands to non-empty
60198
60199  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60200    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60201
60202  # Input might be given as Windows format, start by converting to
60203  # unix format.
60204  path="$POTENTIAL_FREETYPE_LIB_PATH"
60205  new_path=`$CYGPATH -u "$path"`
60206
60207  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60208  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60209  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60210  # "foo.exe" is OK but "foo" is an error.
60211  #
60212  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60213  # It is also a way to make sure we got the proper file name for the real test later on.
60214  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60215  if test "x$test_shortpath" = x; then
60216    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60217$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60218    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60219  fi
60220
60221  # Call helper function which possibly converts this using DOS-style short mode.
60222  # If so, the updated path is stored in $new_path.
60223
60224  input_path="$new_path"
60225  # Check if we need to convert this using DOS-style short mode. If the path
60226  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60227  # take no chances and rewrite it.
60228  # Note: m4 eats our [], so we need to use [ and ] instead.
60229  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60230  if test "x$has_forbidden_chars" != x; then
60231    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60232    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60233    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60234    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60235      # Going to short mode and back again did indeed matter. Since short mode is
60236      # case insensitive, let's make it lowercase to improve readability.
60237      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60238      # Now convert it back to Unix-style (cygpath)
60239      input_path=`$CYGPATH -u "$shortmode_path"`
60240      new_path="$input_path"
60241    fi
60242  fi
60243
60244  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60245  if test "x$test_cygdrive_prefix" = x; then
60246    # As a simple fix, exclude /usr/bin since it's not a real path.
60247    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60248      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60249      # a path prefixed by /cygdrive for fixpath to work.
60250      new_path="$CYGWIN_ROOT_PATH$input_path"
60251    fi
60252  fi
60253
60254
60255  if test "x$path" != "x$new_path"; then
60256    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60257    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60258$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60259  fi
60260
60261    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60262
60263  path="$POTENTIAL_FREETYPE_LIB_PATH"
60264  has_colon=`$ECHO $path | $GREP ^.:`
60265  new_path="$path"
60266  if test "x$has_colon" = x; then
60267    # Not in mixed or Windows style, start by that.
60268    new_path=`cmd //c echo $path`
60269  fi
60270
60271
60272  input_path="$new_path"
60273  # Check if we need to convert this using DOS-style short mode. If the path
60274  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60275  # take no chances and rewrite it.
60276  # Note: m4 eats our [], so we need to use [ and ] instead.
60277  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60278  if test "x$has_forbidden_chars" != x; then
60279    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60280    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60281  fi
60282
60283
60284  windows_path="$new_path"
60285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60286    unix_path=`$CYGPATH -u "$windows_path"`
60287    new_path="$unix_path"
60288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60289    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60290    new_path="$unix_path"
60291  fi
60292
60293  if test "x$path" != "x$new_path"; then
60294    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60295    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60296$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60297  fi
60298
60299  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60300  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60301
60302    else
60303      # We're on a unix platform. Hooray! :)
60304      path="$POTENTIAL_FREETYPE_LIB_PATH"
60305      has_space=`$ECHO "$path" | $GREP " "`
60306      if test "x$has_space" != x; then
60307        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60308$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60309        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60310      fi
60311
60312      # Use eval to expand a potential ~
60313      eval path="$path"
60314      if test ! -f "$path" && test ! -d "$path"; then
60315        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60316      fi
60317
60318      if test -d "$path"; then
60319        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60320      else
60321        dir="`$DIRNAME "$path"`"
60322        base="`$BASENAME "$path"`"
60323        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60324      fi
60325    fi
60326  fi
60327
60328
60329    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60330    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60331$as_echo_n "checking for freetype includes... " >&6; }
60332    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60333$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60334    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60335    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60336$as_echo_n "checking for freetype libraries... " >&6; }
60337    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60338$as_echo "$FREETYPE_LIB_PATH" >&6; }
60339  fi
60340
60341
60342          if test "x$FOUND_FREETYPE" != xyes; then
60343            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60344
60345  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60346  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60347  METHOD="well-known location"
60348
60349  # Let's start with an optimistic view of the world :-)
60350  FOUND_FREETYPE=yes
60351
60352  # First look for the canonical freetype main include file ft2build.h.
60353  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60354    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60355    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60356    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60357      # Fail.
60358      FOUND_FREETYPE=no
60359    fi
60360  fi
60361
60362  if test "x$FOUND_FREETYPE" = xyes; then
60363    # Include file found, let's continue the sanity check.
60364    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60365$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60366
60367    # Reset to default value
60368    FREETYPE_BASE_NAME=freetype
60369    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60370    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60371      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60372          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60373        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60374        # for the .6 version explicitly.
60375        FREETYPE_BASE_NAME=freetype.6
60376        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60377        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60378$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60379      else
60380        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60381$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60382        FOUND_FREETYPE=no
60383      fi
60384    else
60385      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60386        # On Windows, we will need both .lib and .dll file.
60387        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60388          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60389$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60390          FOUND_FREETYPE=no
60391        fi
60392      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60393          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60394        # Found lib in isa dir, use that instead.
60395        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60396        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60397$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60398      fi
60399    fi
60400  fi
60401
60402  if test "x$FOUND_FREETYPE" = xyes; then
60403
60404  # Only process if variable expands to non-empty
60405
60406  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60407    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60408
60409  # Input might be given as Windows format, start by converting to
60410  # unix format.
60411  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60412  new_path=`$CYGPATH -u "$path"`
60413
60414  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60415  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60416  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60417  # "foo.exe" is OK but "foo" is an error.
60418  #
60419  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60420  # It is also a way to make sure we got the proper file name for the real test later on.
60421  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60422  if test "x$test_shortpath" = x; then
60423    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60424$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60425    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60426  fi
60427
60428  # Call helper function which possibly converts this using DOS-style short mode.
60429  # If so, the updated path is stored in $new_path.
60430
60431  input_path="$new_path"
60432  # Check if we need to convert this using DOS-style short mode. If the path
60433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60434  # take no chances and rewrite it.
60435  # Note: m4 eats our [], so we need to use [ and ] instead.
60436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60437  if test "x$has_forbidden_chars" != x; then
60438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60439    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60440    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60441    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60442      # Going to short mode and back again did indeed matter. Since short mode is
60443      # case insensitive, let's make it lowercase to improve readability.
60444      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60445      # Now convert it back to Unix-style (cygpath)
60446      input_path=`$CYGPATH -u "$shortmode_path"`
60447      new_path="$input_path"
60448    fi
60449  fi
60450
60451  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60452  if test "x$test_cygdrive_prefix" = x; then
60453    # As a simple fix, exclude /usr/bin since it's not a real path.
60454    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60455      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60456      # a path prefixed by /cygdrive for fixpath to work.
60457      new_path="$CYGWIN_ROOT_PATH$input_path"
60458    fi
60459  fi
60460
60461
60462  if test "x$path" != "x$new_path"; then
60463    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60464    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60465$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60466  fi
60467
60468    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60469
60470  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60471  has_colon=`$ECHO $path | $GREP ^.:`
60472  new_path="$path"
60473  if test "x$has_colon" = x; then
60474    # Not in mixed or Windows style, start by that.
60475    new_path=`cmd //c echo $path`
60476  fi
60477
60478
60479  input_path="$new_path"
60480  # Check if we need to convert this using DOS-style short mode. If the path
60481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60482  # take no chances and rewrite it.
60483  # Note: m4 eats our [], so we need to use [ and ] instead.
60484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60485  if test "x$has_forbidden_chars" != x; then
60486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60487    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60488  fi
60489
60490
60491  windows_path="$new_path"
60492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60493    unix_path=`$CYGPATH -u "$windows_path"`
60494    new_path="$unix_path"
60495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60496    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60497    new_path="$unix_path"
60498  fi
60499
60500  if test "x$path" != "x$new_path"; then
60501    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60502    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60503$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60504  fi
60505
60506  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60507  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60508
60509    else
60510      # We're on a unix platform. Hooray! :)
60511      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60512      has_space=`$ECHO "$path" | $GREP " "`
60513      if test "x$has_space" != x; then
60514        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60515$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60516        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60517      fi
60518
60519      # Use eval to expand a potential ~
60520      eval path="$path"
60521      if test ! -f "$path" && test ! -d "$path"; then
60522        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60523      fi
60524
60525      if test -d "$path"; then
60526        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60527      else
60528        dir="`$DIRNAME "$path"`"
60529        base="`$BASENAME "$path"`"
60530        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60531      fi
60532    fi
60533  fi
60534
60535
60536  # Only process if variable expands to non-empty
60537
60538  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60539    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60540
60541  # Input might be given as Windows format, start by converting to
60542  # unix format.
60543  path="$POTENTIAL_FREETYPE_LIB_PATH"
60544  new_path=`$CYGPATH -u "$path"`
60545
60546  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60547  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60548  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60549  # "foo.exe" is OK but "foo" is an error.
60550  #
60551  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60552  # It is also a way to make sure we got the proper file name for the real test later on.
60553  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60554  if test "x$test_shortpath" = x; then
60555    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60556$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60557    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60558  fi
60559
60560  # Call helper function which possibly converts this using DOS-style short mode.
60561  # If so, the updated path is stored in $new_path.
60562
60563  input_path="$new_path"
60564  # Check if we need to convert this using DOS-style short mode. If the path
60565  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60566  # take no chances and rewrite it.
60567  # Note: m4 eats our [], so we need to use [ and ] instead.
60568  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60569  if test "x$has_forbidden_chars" != x; then
60570    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60571    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60572    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60573    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60574      # Going to short mode and back again did indeed matter. Since short mode is
60575      # case insensitive, let's make it lowercase to improve readability.
60576      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60577      # Now convert it back to Unix-style (cygpath)
60578      input_path=`$CYGPATH -u "$shortmode_path"`
60579      new_path="$input_path"
60580    fi
60581  fi
60582
60583  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60584  if test "x$test_cygdrive_prefix" = x; then
60585    # As a simple fix, exclude /usr/bin since it's not a real path.
60586    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60587      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60588      # a path prefixed by /cygdrive for fixpath to work.
60589      new_path="$CYGWIN_ROOT_PATH$input_path"
60590    fi
60591  fi
60592
60593
60594  if test "x$path" != "x$new_path"; then
60595    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60596    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60597$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60598  fi
60599
60600    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60601
60602  path="$POTENTIAL_FREETYPE_LIB_PATH"
60603  has_colon=`$ECHO $path | $GREP ^.:`
60604  new_path="$path"
60605  if test "x$has_colon" = x; then
60606    # Not in mixed or Windows style, start by that.
60607    new_path=`cmd //c echo $path`
60608  fi
60609
60610
60611  input_path="$new_path"
60612  # Check if we need to convert this using DOS-style short mode. If the path
60613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60614  # take no chances and rewrite it.
60615  # Note: m4 eats our [], so we need to use [ and ] instead.
60616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60617  if test "x$has_forbidden_chars" != x; then
60618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60619    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60620  fi
60621
60622
60623  windows_path="$new_path"
60624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60625    unix_path=`$CYGPATH -u "$windows_path"`
60626    new_path="$unix_path"
60627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60629    new_path="$unix_path"
60630  fi
60631
60632  if test "x$path" != "x$new_path"; then
60633    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60634    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60635$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60636  fi
60637
60638  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60639  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60640
60641    else
60642      # We're on a unix platform. Hooray! :)
60643      path="$POTENTIAL_FREETYPE_LIB_PATH"
60644      has_space=`$ECHO "$path" | $GREP " "`
60645      if test "x$has_space" != x; then
60646        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60647$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60648        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60649      fi
60650
60651      # Use eval to expand a potential ~
60652      eval path="$path"
60653      if test ! -f "$path" && test ! -d "$path"; then
60654        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60655      fi
60656
60657      if test -d "$path"; then
60658        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60659      else
60660        dir="`$DIRNAME "$path"`"
60661        base="`$BASENAME "$path"`"
60662        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60663      fi
60664    fi
60665  fi
60666
60667
60668    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60669    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60670$as_echo_n "checking for freetype includes... " >&6; }
60671    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60672$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60673    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60674    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60675$as_echo_n "checking for freetype libraries... " >&6; }
60676    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60677$as_echo "$FREETYPE_LIB_PATH" >&6; }
60678  fi
60679
60680          fi
60681
60682          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
60683            if test "x$FOUND_FREETYPE" != xyes; then
60684              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
60685              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
60686
60687  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60688  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60689  METHOD="well-known location"
60690
60691  # Let's start with an optimistic view of the world :-)
60692  FOUND_FREETYPE=yes
60693
60694  # First look for the canonical freetype main include file ft2build.h.
60695  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60696    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60697    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60698    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60699      # Fail.
60700      FOUND_FREETYPE=no
60701    fi
60702  fi
60703
60704  if test "x$FOUND_FREETYPE" = xyes; then
60705    # Include file found, let's continue the sanity check.
60706    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60707$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60708
60709    # Reset to default value
60710    FREETYPE_BASE_NAME=freetype
60711    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60712    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60713      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60714          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60715        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60716        # for the .6 version explicitly.
60717        FREETYPE_BASE_NAME=freetype.6
60718        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60719        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60720$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60721      else
60722        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60723$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60724        FOUND_FREETYPE=no
60725      fi
60726    else
60727      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60728        # On Windows, we will need both .lib and .dll file.
60729        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60730          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60731$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60732          FOUND_FREETYPE=no
60733        fi
60734      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60735          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60736        # Found lib in isa dir, use that instead.
60737        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60738        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60739$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60740      fi
60741    fi
60742  fi
60743
60744  if test "x$FOUND_FREETYPE" = xyes; then
60745
60746  # Only process if variable expands to non-empty
60747
60748  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60749    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60750
60751  # Input might be given as Windows format, start by converting to
60752  # unix format.
60753  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60754  new_path=`$CYGPATH -u "$path"`
60755
60756  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60757  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60758  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60759  # "foo.exe" is OK but "foo" is an error.
60760  #
60761  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60762  # It is also a way to make sure we got the proper file name for the real test later on.
60763  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60764  if test "x$test_shortpath" = x; then
60765    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60766$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60767    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60768  fi
60769
60770  # Call helper function which possibly converts this using DOS-style short mode.
60771  # If so, the updated path is stored in $new_path.
60772
60773  input_path="$new_path"
60774  # Check if we need to convert this using DOS-style short mode. If the path
60775  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60776  # take no chances and rewrite it.
60777  # Note: m4 eats our [], so we need to use [ and ] instead.
60778  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60779  if test "x$has_forbidden_chars" != x; then
60780    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60781    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60782    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60783    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60784      # Going to short mode and back again did indeed matter. Since short mode is
60785      # case insensitive, let's make it lowercase to improve readability.
60786      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60787      # Now convert it back to Unix-style (cygpath)
60788      input_path=`$CYGPATH -u "$shortmode_path"`
60789      new_path="$input_path"
60790    fi
60791  fi
60792
60793  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60794  if test "x$test_cygdrive_prefix" = x; then
60795    # As a simple fix, exclude /usr/bin since it's not a real path.
60796    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60797      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60798      # a path prefixed by /cygdrive for fixpath to work.
60799      new_path="$CYGWIN_ROOT_PATH$input_path"
60800    fi
60801  fi
60802
60803
60804  if test "x$path" != "x$new_path"; then
60805    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60806    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60807$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60808  fi
60809
60810    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60811
60812  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60813  has_colon=`$ECHO $path | $GREP ^.:`
60814  new_path="$path"
60815  if test "x$has_colon" = x; then
60816    # Not in mixed or Windows style, start by that.
60817    new_path=`cmd //c echo $path`
60818  fi
60819
60820
60821  input_path="$new_path"
60822  # Check if we need to convert this using DOS-style short mode. If the path
60823  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60824  # take no chances and rewrite it.
60825  # Note: m4 eats our [], so we need to use [ and ] instead.
60826  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60827  if test "x$has_forbidden_chars" != x; then
60828    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60829    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60830  fi
60831
60832
60833  windows_path="$new_path"
60834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60835    unix_path=`$CYGPATH -u "$windows_path"`
60836    new_path="$unix_path"
60837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60839    new_path="$unix_path"
60840  fi
60841
60842  if test "x$path" != "x$new_path"; then
60843    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60844    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60845$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60846  fi
60847
60848  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60849  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60850
60851    else
60852      # We're on a unix platform. Hooray! :)
60853      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60854      has_space=`$ECHO "$path" | $GREP " "`
60855      if test "x$has_space" != x; then
60856        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60857$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60858        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60859      fi
60860
60861      # Use eval to expand a potential ~
60862      eval path="$path"
60863      if test ! -f "$path" && test ! -d "$path"; then
60864        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60865      fi
60866
60867      if test -d "$path"; then
60868        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60869      else
60870        dir="`$DIRNAME "$path"`"
60871        base="`$BASENAME "$path"`"
60872        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60873      fi
60874    fi
60875  fi
60876
60877
60878  # Only process if variable expands to non-empty
60879
60880  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60881    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60882
60883  # Input might be given as Windows format, start by converting to
60884  # unix format.
60885  path="$POTENTIAL_FREETYPE_LIB_PATH"
60886  new_path=`$CYGPATH -u "$path"`
60887
60888  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60889  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60890  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60891  # "foo.exe" is OK but "foo" is an error.
60892  #
60893  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60894  # It is also a way to make sure we got the proper file name for the real test later on.
60895  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60896  if test "x$test_shortpath" = x; then
60897    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60898$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60899    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60900  fi
60901
60902  # Call helper function which possibly converts this using DOS-style short mode.
60903  # If so, the updated path is stored in $new_path.
60904
60905  input_path="$new_path"
60906  # Check if we need to convert this using DOS-style short mode. If the path
60907  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60908  # take no chances and rewrite it.
60909  # Note: m4 eats our [], so we need to use [ and ] instead.
60910  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60911  if test "x$has_forbidden_chars" != x; then
60912    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60913    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60914    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60915    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60916      # Going to short mode and back again did indeed matter. Since short mode is
60917      # case insensitive, let's make it lowercase to improve readability.
60918      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60919      # Now convert it back to Unix-style (cygpath)
60920      input_path=`$CYGPATH -u "$shortmode_path"`
60921      new_path="$input_path"
60922    fi
60923  fi
60924
60925  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60926  if test "x$test_cygdrive_prefix" = x; then
60927    # As a simple fix, exclude /usr/bin since it's not a real path.
60928    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60929      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60930      # a path prefixed by /cygdrive for fixpath to work.
60931      new_path="$CYGWIN_ROOT_PATH$input_path"
60932    fi
60933  fi
60934
60935
60936  if test "x$path" != "x$new_path"; then
60937    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60938    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60939$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60940  fi
60941
60942    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60943
60944  path="$POTENTIAL_FREETYPE_LIB_PATH"
60945  has_colon=`$ECHO $path | $GREP ^.:`
60946  new_path="$path"
60947  if test "x$has_colon" = x; then
60948    # Not in mixed or Windows style, start by that.
60949    new_path=`cmd //c echo $path`
60950  fi
60951
60952
60953  input_path="$new_path"
60954  # Check if we need to convert this using DOS-style short mode. If the path
60955  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60956  # take no chances and rewrite it.
60957  # Note: m4 eats our [], so we need to use [ and ] instead.
60958  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60959  if test "x$has_forbidden_chars" != x; then
60960    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60961    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60962  fi
60963
60964
60965  windows_path="$new_path"
60966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60967    unix_path=`$CYGPATH -u "$windows_path"`
60968    new_path="$unix_path"
60969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60971    new_path="$unix_path"
60972  fi
60973
60974  if test "x$path" != "x$new_path"; then
60975    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60976    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60977$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60978  fi
60979
60980  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60981  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60982
60983    else
60984      # We're on a unix platform. Hooray! :)
60985      path="$POTENTIAL_FREETYPE_LIB_PATH"
60986      has_space=`$ECHO "$path" | $GREP " "`
60987      if test "x$has_space" != x; then
60988        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60989$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60990        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60991      fi
60992
60993      # Use eval to expand a potential ~
60994      eval path="$path"
60995      if test ! -f "$path" && test ! -d "$path"; then
60996        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60997      fi
60998
60999      if test -d "$path"; then
61000        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61001      else
61002        dir="`$DIRNAME "$path"`"
61003        base="`$BASENAME "$path"`"
61004        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61005      fi
61006    fi
61007  fi
61008
61009
61010    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61011    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61012$as_echo_n "checking for freetype includes... " >&6; }
61013    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61014$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61015    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61016    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61017$as_echo_n "checking for freetype libraries... " >&6; }
61018    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61019$as_echo "$FREETYPE_LIB_PATH" >&6; }
61020  fi
61021
61022            fi
61023          fi
61024
61025          if test "x$FOUND_FREETYPE" != xyes; then
61026            FREETYPE_BASE_DIR="$SYSROOT/usr"
61027            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61028
61029  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61030  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61031  METHOD="well-known location"
61032
61033  # Let's start with an optimistic view of the world :-)
61034  FOUND_FREETYPE=yes
61035
61036  # First look for the canonical freetype main include file ft2build.h.
61037  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61038    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61039    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61040    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61041      # Fail.
61042      FOUND_FREETYPE=no
61043    fi
61044  fi
61045
61046  if test "x$FOUND_FREETYPE" = xyes; then
61047    # Include file found, let's continue the sanity check.
61048    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61049$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61050
61051    # Reset to default value
61052    FREETYPE_BASE_NAME=freetype
61053    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61054    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61055      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61056          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61057        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61058        # for the .6 version explicitly.
61059        FREETYPE_BASE_NAME=freetype.6
61060        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61061        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61062$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61063      else
61064        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61065$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61066        FOUND_FREETYPE=no
61067      fi
61068    else
61069      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61070        # On Windows, we will need both .lib and .dll file.
61071        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61072          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61073$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61074          FOUND_FREETYPE=no
61075        fi
61076      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61077          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61078        # Found lib in isa dir, use that instead.
61079        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61080        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61081$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61082      fi
61083    fi
61084  fi
61085
61086  if test "x$FOUND_FREETYPE" = xyes; then
61087
61088  # Only process if variable expands to non-empty
61089
61090  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61091    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61092
61093  # Input might be given as Windows format, start by converting to
61094  # unix format.
61095  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61096  new_path=`$CYGPATH -u "$path"`
61097
61098  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61099  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61100  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61101  # "foo.exe" is OK but "foo" is an error.
61102  #
61103  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61104  # It is also a way to make sure we got the proper file name for the real test later on.
61105  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61106  if test "x$test_shortpath" = x; then
61107    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61108$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61109    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61110  fi
61111
61112  # Call helper function which possibly converts this using DOS-style short mode.
61113  # If so, the updated path is stored in $new_path.
61114
61115  input_path="$new_path"
61116  # Check if we need to convert this using DOS-style short mode. If the path
61117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61118  # take no chances and rewrite it.
61119  # Note: m4 eats our [], so we need to use [ and ] instead.
61120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61121  if test "x$has_forbidden_chars" != x; then
61122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61123    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61124    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61125    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61126      # Going to short mode and back again did indeed matter. Since short mode is
61127      # case insensitive, let's make it lowercase to improve readability.
61128      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61129      # Now convert it back to Unix-style (cygpath)
61130      input_path=`$CYGPATH -u "$shortmode_path"`
61131      new_path="$input_path"
61132    fi
61133  fi
61134
61135  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61136  if test "x$test_cygdrive_prefix" = x; then
61137    # As a simple fix, exclude /usr/bin since it's not a real path.
61138    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61139      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61140      # a path prefixed by /cygdrive for fixpath to work.
61141      new_path="$CYGWIN_ROOT_PATH$input_path"
61142    fi
61143  fi
61144
61145
61146  if test "x$path" != "x$new_path"; then
61147    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61148    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61149$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61150  fi
61151
61152    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61153
61154  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61155  has_colon=`$ECHO $path | $GREP ^.:`
61156  new_path="$path"
61157  if test "x$has_colon" = x; then
61158    # Not in mixed or Windows style, start by that.
61159    new_path=`cmd //c echo $path`
61160  fi
61161
61162
61163  input_path="$new_path"
61164  # Check if we need to convert this using DOS-style short mode. If the path
61165  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61166  # take no chances and rewrite it.
61167  # Note: m4 eats our [], so we need to use [ and ] instead.
61168  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61169  if test "x$has_forbidden_chars" != x; then
61170    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61171    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61172  fi
61173
61174
61175  windows_path="$new_path"
61176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61177    unix_path=`$CYGPATH -u "$windows_path"`
61178    new_path="$unix_path"
61179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61180    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61181    new_path="$unix_path"
61182  fi
61183
61184  if test "x$path" != "x$new_path"; then
61185    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61186    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61187$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61188  fi
61189
61190  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61191  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61192
61193    else
61194      # We're on a unix platform. Hooray! :)
61195      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61196      has_space=`$ECHO "$path" | $GREP " "`
61197      if test "x$has_space" != x; then
61198        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61199$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61200        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61201      fi
61202
61203      # Use eval to expand a potential ~
61204      eval path="$path"
61205      if test ! -f "$path" && test ! -d "$path"; then
61206        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61207      fi
61208
61209      if test -d "$path"; then
61210        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61211      else
61212        dir="`$DIRNAME "$path"`"
61213        base="`$BASENAME "$path"`"
61214        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61215      fi
61216    fi
61217  fi
61218
61219
61220  # Only process if variable expands to non-empty
61221
61222  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61223    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61224
61225  # Input might be given as Windows format, start by converting to
61226  # unix format.
61227  path="$POTENTIAL_FREETYPE_LIB_PATH"
61228  new_path=`$CYGPATH -u "$path"`
61229
61230  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61231  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61232  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61233  # "foo.exe" is OK but "foo" is an error.
61234  #
61235  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61236  # It is also a way to make sure we got the proper file name for the real test later on.
61237  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61238  if test "x$test_shortpath" = x; then
61239    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61240$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61241    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61242  fi
61243
61244  # Call helper function which possibly converts this using DOS-style short mode.
61245  # If so, the updated path is stored in $new_path.
61246
61247  input_path="$new_path"
61248  # Check if we need to convert this using DOS-style short mode. If the path
61249  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61250  # take no chances and rewrite it.
61251  # Note: m4 eats our [], so we need to use [ and ] instead.
61252  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61253  if test "x$has_forbidden_chars" != x; then
61254    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61255    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61256    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61257    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61258      # Going to short mode and back again did indeed matter. Since short mode is
61259      # case insensitive, let's make it lowercase to improve readability.
61260      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61261      # Now convert it back to Unix-style (cygpath)
61262      input_path=`$CYGPATH -u "$shortmode_path"`
61263      new_path="$input_path"
61264    fi
61265  fi
61266
61267  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61268  if test "x$test_cygdrive_prefix" = x; then
61269    # As a simple fix, exclude /usr/bin since it's not a real path.
61270    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61271      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61272      # a path prefixed by /cygdrive for fixpath to work.
61273      new_path="$CYGWIN_ROOT_PATH$input_path"
61274    fi
61275  fi
61276
61277
61278  if test "x$path" != "x$new_path"; then
61279    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61280    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61281$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61282  fi
61283
61284    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61285
61286  path="$POTENTIAL_FREETYPE_LIB_PATH"
61287  has_colon=`$ECHO $path | $GREP ^.:`
61288  new_path="$path"
61289  if test "x$has_colon" = x; then
61290    # Not in mixed or Windows style, start by that.
61291    new_path=`cmd //c echo $path`
61292  fi
61293
61294
61295  input_path="$new_path"
61296  # Check if we need to convert this using DOS-style short mode. If the path
61297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61298  # take no chances and rewrite it.
61299  # Note: m4 eats our [], so we need to use [ and ] instead.
61300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61301  if test "x$has_forbidden_chars" != x; then
61302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61303    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61304  fi
61305
61306
61307  windows_path="$new_path"
61308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61309    unix_path=`$CYGPATH -u "$windows_path"`
61310    new_path="$unix_path"
61311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61313    new_path="$unix_path"
61314  fi
61315
61316  if test "x$path" != "x$new_path"; then
61317    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61318    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61319$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61320  fi
61321
61322  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61323  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61324
61325    else
61326      # We're on a unix platform. Hooray! :)
61327      path="$POTENTIAL_FREETYPE_LIB_PATH"
61328      has_space=`$ECHO "$path" | $GREP " "`
61329      if test "x$has_space" != x; then
61330        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61331$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61332        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61333      fi
61334
61335      # Use eval to expand a potential ~
61336      eval path="$path"
61337      if test ! -f "$path" && test ! -d "$path"; then
61338        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61339      fi
61340
61341      if test -d "$path"; then
61342        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61343      else
61344        dir="`$DIRNAME "$path"`"
61345        base="`$BASENAME "$path"`"
61346        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61347      fi
61348    fi
61349  fi
61350
61351
61352    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61353    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61354$as_echo_n "checking for freetype includes... " >&6; }
61355    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61356$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61357    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61358    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61359$as_echo_n "checking for freetype libraries... " >&6; }
61360    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61361$as_echo "$FREETYPE_LIB_PATH" >&6; }
61362  fi
61363
61364            else
61365
61366  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61367  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61368  METHOD="well-known location"
61369
61370  # Let's start with an optimistic view of the world :-)
61371  FOUND_FREETYPE=yes
61372
61373  # First look for the canonical freetype main include file ft2build.h.
61374  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61375    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61376    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61377    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61378      # Fail.
61379      FOUND_FREETYPE=no
61380    fi
61381  fi
61382
61383  if test "x$FOUND_FREETYPE" = xyes; then
61384    # Include file found, let's continue the sanity check.
61385    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61386$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61387
61388    # Reset to default value
61389    FREETYPE_BASE_NAME=freetype
61390    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61391    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61392      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61393          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61394        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61395        # for the .6 version explicitly.
61396        FREETYPE_BASE_NAME=freetype.6
61397        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61398        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61399$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61400      else
61401        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61402$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61403        FOUND_FREETYPE=no
61404      fi
61405    else
61406      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61407        # On Windows, we will need both .lib and .dll file.
61408        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61409          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61410$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61411          FOUND_FREETYPE=no
61412        fi
61413      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61414          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61415        # Found lib in isa dir, use that instead.
61416        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61417        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61418$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61419      fi
61420    fi
61421  fi
61422
61423  if test "x$FOUND_FREETYPE" = xyes; then
61424
61425  # Only process if variable expands to non-empty
61426
61427  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61428    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61429
61430  # Input might be given as Windows format, start by converting to
61431  # unix format.
61432  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61433  new_path=`$CYGPATH -u "$path"`
61434
61435  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61436  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61437  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61438  # "foo.exe" is OK but "foo" is an error.
61439  #
61440  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61441  # It is also a way to make sure we got the proper file name for the real test later on.
61442  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61443  if test "x$test_shortpath" = x; then
61444    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61445$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61446    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61447  fi
61448
61449  # Call helper function which possibly converts this using DOS-style short mode.
61450  # If so, the updated path is stored in $new_path.
61451
61452  input_path="$new_path"
61453  # Check if we need to convert this using DOS-style short mode. If the path
61454  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61455  # take no chances and rewrite it.
61456  # Note: m4 eats our [], so we need to use [ and ] instead.
61457  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61458  if test "x$has_forbidden_chars" != x; then
61459    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61460    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61461    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61462    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61463      # Going to short mode and back again did indeed matter. Since short mode is
61464      # case insensitive, let's make it lowercase to improve readability.
61465      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61466      # Now convert it back to Unix-style (cygpath)
61467      input_path=`$CYGPATH -u "$shortmode_path"`
61468      new_path="$input_path"
61469    fi
61470  fi
61471
61472  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61473  if test "x$test_cygdrive_prefix" = x; then
61474    # As a simple fix, exclude /usr/bin since it's not a real path.
61475    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61476      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61477      # a path prefixed by /cygdrive for fixpath to work.
61478      new_path="$CYGWIN_ROOT_PATH$input_path"
61479    fi
61480  fi
61481
61482
61483  if test "x$path" != "x$new_path"; then
61484    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61485    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61486$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61487  fi
61488
61489    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61490
61491  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61492  has_colon=`$ECHO $path | $GREP ^.:`
61493  new_path="$path"
61494  if test "x$has_colon" = x; then
61495    # Not in mixed or Windows style, start by that.
61496    new_path=`cmd //c echo $path`
61497  fi
61498
61499
61500  input_path="$new_path"
61501  # Check if we need to convert this using DOS-style short mode. If the path
61502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61503  # take no chances and rewrite it.
61504  # Note: m4 eats our [], so we need to use [ and ] instead.
61505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61506  if test "x$has_forbidden_chars" != x; then
61507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61508    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61509  fi
61510
61511
61512  windows_path="$new_path"
61513  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61514    unix_path=`$CYGPATH -u "$windows_path"`
61515    new_path="$unix_path"
61516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61517    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61518    new_path="$unix_path"
61519  fi
61520
61521  if test "x$path" != "x$new_path"; then
61522    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61523    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61524$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61525  fi
61526
61527  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61528  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61529
61530    else
61531      # We're on a unix platform. Hooray! :)
61532      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61533      has_space=`$ECHO "$path" | $GREP " "`
61534      if test "x$has_space" != x; then
61535        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61536$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61537        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61538      fi
61539
61540      # Use eval to expand a potential ~
61541      eval path="$path"
61542      if test ! -f "$path" && test ! -d "$path"; then
61543        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61544      fi
61545
61546      if test -d "$path"; then
61547        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61548      else
61549        dir="`$DIRNAME "$path"`"
61550        base="`$BASENAME "$path"`"
61551        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61552      fi
61553    fi
61554  fi
61555
61556
61557  # Only process if variable expands to non-empty
61558
61559  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61560    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61561
61562  # Input might be given as Windows format, start by converting to
61563  # unix format.
61564  path="$POTENTIAL_FREETYPE_LIB_PATH"
61565  new_path=`$CYGPATH -u "$path"`
61566
61567  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61568  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61569  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61570  # "foo.exe" is OK but "foo" is an error.
61571  #
61572  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61573  # It is also a way to make sure we got the proper file name for the real test later on.
61574  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61575  if test "x$test_shortpath" = x; then
61576    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61577$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61578    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61579  fi
61580
61581  # Call helper function which possibly converts this using DOS-style short mode.
61582  # If so, the updated path is stored in $new_path.
61583
61584  input_path="$new_path"
61585  # Check if we need to convert this using DOS-style short mode. If the path
61586  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61587  # take no chances and rewrite it.
61588  # Note: m4 eats our [], so we need to use [ and ] instead.
61589  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61590  if test "x$has_forbidden_chars" != x; then
61591    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61592    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61593    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61594    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61595      # Going to short mode and back again did indeed matter. Since short mode is
61596      # case insensitive, let's make it lowercase to improve readability.
61597      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61598      # Now convert it back to Unix-style (cygpath)
61599      input_path=`$CYGPATH -u "$shortmode_path"`
61600      new_path="$input_path"
61601    fi
61602  fi
61603
61604  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61605  if test "x$test_cygdrive_prefix" = x; then
61606    # As a simple fix, exclude /usr/bin since it's not a real path.
61607    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61608      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61609      # a path prefixed by /cygdrive for fixpath to work.
61610      new_path="$CYGWIN_ROOT_PATH$input_path"
61611    fi
61612  fi
61613
61614
61615  if test "x$path" != "x$new_path"; then
61616    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61617    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61618$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61619  fi
61620
61621    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61622
61623  path="$POTENTIAL_FREETYPE_LIB_PATH"
61624  has_colon=`$ECHO $path | $GREP ^.:`
61625  new_path="$path"
61626  if test "x$has_colon" = x; then
61627    # Not in mixed or Windows style, start by that.
61628    new_path=`cmd //c echo $path`
61629  fi
61630
61631
61632  input_path="$new_path"
61633  # Check if we need to convert this using DOS-style short mode. If the path
61634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61635  # take no chances and rewrite it.
61636  # Note: m4 eats our [], so we need to use [ and ] instead.
61637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61638  if test "x$has_forbidden_chars" != x; then
61639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61640    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61641  fi
61642
61643
61644  windows_path="$new_path"
61645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61646    unix_path=`$CYGPATH -u "$windows_path"`
61647    new_path="$unix_path"
61648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61649    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61650    new_path="$unix_path"
61651  fi
61652
61653  if test "x$path" != "x$new_path"; then
61654    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61655    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61656$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61657  fi
61658
61659  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61660  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61661
61662    else
61663      # We're on a unix platform. Hooray! :)
61664      path="$POTENTIAL_FREETYPE_LIB_PATH"
61665      has_space=`$ECHO "$path" | $GREP " "`
61666      if test "x$has_space" != x; then
61667        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61668$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61669        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61670      fi
61671
61672      # Use eval to expand a potential ~
61673      eval path="$path"
61674      if test ! -f "$path" && test ! -d "$path"; then
61675        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61676      fi
61677
61678      if test -d "$path"; then
61679        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61680      else
61681        dir="`$DIRNAME "$path"`"
61682        base="`$BASENAME "$path"`"
61683        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61684      fi
61685    fi
61686  fi
61687
61688
61689    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61690    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61691$as_echo_n "checking for freetype includes... " >&6; }
61692    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61693$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61694    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61695    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61696$as_echo_n "checking for freetype libraries... " >&6; }
61697    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61698$as_echo "$FREETYPE_LIB_PATH" >&6; }
61699  fi
61700
61701              if test "x$FOUND_FREETYPE" != xyes; then
61702
61703  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61704  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
61705  METHOD="well-known location"
61706
61707  # Let's start with an optimistic view of the world :-)
61708  FOUND_FREETYPE=yes
61709
61710  # First look for the canonical freetype main include file ft2build.h.
61711  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61712    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61713    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61714    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61715      # Fail.
61716      FOUND_FREETYPE=no
61717    fi
61718  fi
61719
61720  if test "x$FOUND_FREETYPE" = xyes; then
61721    # Include file found, let's continue the sanity check.
61722    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61723$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61724
61725    # Reset to default value
61726    FREETYPE_BASE_NAME=freetype
61727    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61728    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61729      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61730          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61731        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61732        # for the .6 version explicitly.
61733        FREETYPE_BASE_NAME=freetype.6
61734        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61735        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61736$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61737      else
61738        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61739$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61740        FOUND_FREETYPE=no
61741      fi
61742    else
61743      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61744        # On Windows, we will need both .lib and .dll file.
61745        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61746          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61747$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61748          FOUND_FREETYPE=no
61749        fi
61750      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61751          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61752        # Found lib in isa dir, use that instead.
61753        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61754        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61755$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61756      fi
61757    fi
61758  fi
61759
61760  if test "x$FOUND_FREETYPE" = xyes; then
61761
61762  # Only process if variable expands to non-empty
61763
61764  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61765    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61766
61767  # Input might be given as Windows format, start by converting to
61768  # unix format.
61769  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61770  new_path=`$CYGPATH -u "$path"`
61771
61772  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61773  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61774  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61775  # "foo.exe" is OK but "foo" is an error.
61776  #
61777  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61778  # It is also a way to make sure we got the proper file name for the real test later on.
61779  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61780  if test "x$test_shortpath" = x; then
61781    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61782$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61783    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61784  fi
61785
61786  # Call helper function which possibly converts this using DOS-style short mode.
61787  # If so, the updated path is stored in $new_path.
61788
61789  input_path="$new_path"
61790  # Check if we need to convert this using DOS-style short mode. If the path
61791  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61792  # take no chances and rewrite it.
61793  # Note: m4 eats our [], so we need to use [ and ] instead.
61794  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61795  if test "x$has_forbidden_chars" != x; then
61796    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61797    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61798    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61799    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61800      # Going to short mode and back again did indeed matter. Since short mode is
61801      # case insensitive, let's make it lowercase to improve readability.
61802      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61803      # Now convert it back to Unix-style (cygpath)
61804      input_path=`$CYGPATH -u "$shortmode_path"`
61805      new_path="$input_path"
61806    fi
61807  fi
61808
61809  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61810  if test "x$test_cygdrive_prefix" = x; then
61811    # As a simple fix, exclude /usr/bin since it's not a real path.
61812    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61813      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61814      # a path prefixed by /cygdrive for fixpath to work.
61815      new_path="$CYGWIN_ROOT_PATH$input_path"
61816    fi
61817  fi
61818
61819
61820  if test "x$path" != "x$new_path"; then
61821    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61822    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61823$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61824  fi
61825
61826    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61827
61828  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61829  has_colon=`$ECHO $path | $GREP ^.:`
61830  new_path="$path"
61831  if test "x$has_colon" = x; then
61832    # Not in mixed or Windows style, start by that.
61833    new_path=`cmd //c echo $path`
61834  fi
61835
61836
61837  input_path="$new_path"
61838  # Check if we need to convert this using DOS-style short mode. If the path
61839  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61840  # take no chances and rewrite it.
61841  # Note: m4 eats our [], so we need to use [ and ] instead.
61842  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61843  if test "x$has_forbidden_chars" != x; then
61844    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61845    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61846  fi
61847
61848
61849  windows_path="$new_path"
61850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61851    unix_path=`$CYGPATH -u "$windows_path"`
61852    new_path="$unix_path"
61853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61855    new_path="$unix_path"
61856  fi
61857
61858  if test "x$path" != "x$new_path"; then
61859    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61860    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61861$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61862  fi
61863
61864  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61865  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61866
61867    else
61868      # We're on a unix platform. Hooray! :)
61869      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61870      has_space=`$ECHO "$path" | $GREP " "`
61871      if test "x$has_space" != x; then
61872        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61873$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61874        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61875      fi
61876
61877      # Use eval to expand a potential ~
61878      eval path="$path"
61879      if test ! -f "$path" && test ! -d "$path"; then
61880        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61881      fi
61882
61883      if test -d "$path"; then
61884        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61885      else
61886        dir="`$DIRNAME "$path"`"
61887        base="`$BASENAME "$path"`"
61888        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61889      fi
61890    fi
61891  fi
61892
61893
61894  # Only process if variable expands to non-empty
61895
61896  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61897    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61898
61899  # Input might be given as Windows format, start by converting to
61900  # unix format.
61901  path="$POTENTIAL_FREETYPE_LIB_PATH"
61902  new_path=`$CYGPATH -u "$path"`
61903
61904  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61905  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61906  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61907  # "foo.exe" is OK but "foo" is an error.
61908  #
61909  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61910  # It is also a way to make sure we got the proper file name for the real test later on.
61911  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61912  if test "x$test_shortpath" = x; then
61913    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61914$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61915    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61916  fi
61917
61918  # Call helper function which possibly converts this using DOS-style short mode.
61919  # If so, the updated path is stored in $new_path.
61920
61921  input_path="$new_path"
61922  # Check if we need to convert this using DOS-style short mode. If the path
61923  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61924  # take no chances and rewrite it.
61925  # Note: m4 eats our [], so we need to use [ and ] instead.
61926  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61927  if test "x$has_forbidden_chars" != x; then
61928    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61929    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61930    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61931    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61932      # Going to short mode and back again did indeed matter. Since short mode is
61933      # case insensitive, let's make it lowercase to improve readability.
61934      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61935      # Now convert it back to Unix-style (cygpath)
61936      input_path=`$CYGPATH -u "$shortmode_path"`
61937      new_path="$input_path"
61938    fi
61939  fi
61940
61941  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61942  if test "x$test_cygdrive_prefix" = x; then
61943    # As a simple fix, exclude /usr/bin since it's not a real path.
61944    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61945      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61946      # a path prefixed by /cygdrive for fixpath to work.
61947      new_path="$CYGWIN_ROOT_PATH$input_path"
61948    fi
61949  fi
61950
61951
61952  if test "x$path" != "x$new_path"; then
61953    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61954    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61955$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61956  fi
61957
61958    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61959
61960  path="$POTENTIAL_FREETYPE_LIB_PATH"
61961  has_colon=`$ECHO $path | $GREP ^.:`
61962  new_path="$path"
61963  if test "x$has_colon" = x; then
61964    # Not in mixed or Windows style, start by that.
61965    new_path=`cmd //c echo $path`
61966  fi
61967
61968
61969  input_path="$new_path"
61970  # Check if we need to convert this using DOS-style short mode. If the path
61971  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61972  # take no chances and rewrite it.
61973  # Note: m4 eats our [], so we need to use [ and ] instead.
61974  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61975  if test "x$has_forbidden_chars" != x; then
61976    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61977    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61978  fi
61979
61980
61981  windows_path="$new_path"
61982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61983    unix_path=`$CYGPATH -u "$windows_path"`
61984    new_path="$unix_path"
61985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61986    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61987    new_path="$unix_path"
61988  fi
61989
61990  if test "x$path" != "x$new_path"; then
61991    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61992    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61993$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61994  fi
61995
61996  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61997  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61998
61999    else
62000      # We're on a unix platform. Hooray! :)
62001      path="$POTENTIAL_FREETYPE_LIB_PATH"
62002      has_space=`$ECHO "$path" | $GREP " "`
62003      if test "x$has_space" != x; then
62004        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62005$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62006        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62007      fi
62008
62009      # Use eval to expand a potential ~
62010      eval path="$path"
62011      if test ! -f "$path" && test ! -d "$path"; then
62012        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62013      fi
62014
62015      if test -d "$path"; then
62016        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62017      else
62018        dir="`$DIRNAME "$path"`"
62019        base="`$BASENAME "$path"`"
62020        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62021      fi
62022    fi
62023  fi
62024
62025
62026    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62027    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62028$as_echo_n "checking for freetype includes... " >&6; }
62029    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62030$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62031    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62032    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62033$as_echo_n "checking for freetype libraries... " >&6; }
62034    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62035$as_echo "$FREETYPE_LIB_PATH" >&6; }
62036  fi
62037
62038              fi
62039            fi
62040          fi
62041        fi
62042      fi # end check in well-known locations
62043
62044      if test "x$FOUND_FREETYPE" != xyes; then
62045
62046  # Print a helpful message on how to acquire the necessary build dependency.
62047  # freetype is the help tag: freetype, cups, alsa etc
62048  MISSING_DEPENDENCY=freetype
62049
62050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62051    cygwin_help $MISSING_DEPENDENCY
62052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62053    msys_help $MISSING_DEPENDENCY
62054  else
62055    PKGHANDLER_COMMAND=
62056
62057    case $PKGHANDLER in
62058      apt-get)
62059        apt_help     $MISSING_DEPENDENCY ;;
62060      yum)
62061        yum_help     $MISSING_DEPENDENCY ;;
62062      port)
62063        port_help    $MISSING_DEPENDENCY ;;
62064      pkgutil)
62065        pkgutil_help $MISSING_DEPENDENCY ;;
62066      pkgadd)
62067        pkgadd_help  $MISSING_DEPENDENCY ;;
62068    esac
62069
62070    if test "x$PKGHANDLER_COMMAND" != x; then
62071      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62072    fi
62073  fi
62074
62075        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62076      fi
62077    fi # end user specified settings
62078
62079    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62080    if test "x$FREETYPE_CFLAGS" = x; then
62081
62082  # Only process if variable expands to non-empty
62083
62084  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62085    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62086
62087  # Input might be given as Windows format, start by converting to
62088  # unix format.
62089  path="$FREETYPE_INCLUDE_PATH"
62090  new_path=`$CYGPATH -u "$path"`
62091
62092  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62093  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62094  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62095  # "foo.exe" is OK but "foo" is an error.
62096  #
62097  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62098  # It is also a way to make sure we got the proper file name for the real test later on.
62099  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62100  if test "x$test_shortpath" = x; then
62101    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62102$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62103    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62104  fi
62105
62106  # Call helper function which possibly converts this using DOS-style short mode.
62107  # If so, the updated path is stored in $new_path.
62108
62109  input_path="$new_path"
62110  # Check if we need to convert this using DOS-style short mode. If the path
62111  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62112  # take no chances and rewrite it.
62113  # Note: m4 eats our [], so we need to use [ and ] instead.
62114  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62115  if test "x$has_forbidden_chars" != x; then
62116    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62117    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62118    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62119    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62120      # Going to short mode and back again did indeed matter. Since short mode is
62121      # case insensitive, let's make it lowercase to improve readability.
62122      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62123      # Now convert it back to Unix-style (cygpath)
62124      input_path=`$CYGPATH -u "$shortmode_path"`
62125      new_path="$input_path"
62126    fi
62127  fi
62128
62129  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62130  if test "x$test_cygdrive_prefix" = x; then
62131    # As a simple fix, exclude /usr/bin since it's not a real path.
62132    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62133      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62134      # a path prefixed by /cygdrive for fixpath to work.
62135      new_path="$CYGWIN_ROOT_PATH$input_path"
62136    fi
62137  fi
62138
62139
62140  if test "x$path" != "x$new_path"; then
62141    FREETYPE_INCLUDE_PATH="$new_path"
62142    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62143$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62144  fi
62145
62146    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62147
62148  path="$FREETYPE_INCLUDE_PATH"
62149  has_colon=`$ECHO $path | $GREP ^.:`
62150  new_path="$path"
62151  if test "x$has_colon" = x; then
62152    # Not in mixed or Windows style, start by that.
62153    new_path=`cmd //c echo $path`
62154  fi
62155
62156
62157  input_path="$new_path"
62158  # Check if we need to convert this using DOS-style short mode. If the path
62159  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62160  # take no chances and rewrite it.
62161  # Note: m4 eats our [], so we need to use [ and ] instead.
62162  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62163  if test "x$has_forbidden_chars" != x; then
62164    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62165    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62166  fi
62167
62168
62169  windows_path="$new_path"
62170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62171    unix_path=`$CYGPATH -u "$windows_path"`
62172    new_path="$unix_path"
62173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62174    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62175    new_path="$unix_path"
62176  fi
62177
62178  if test "x$path" != "x$new_path"; then
62179    FREETYPE_INCLUDE_PATH="$new_path"
62180    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62181$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62182  fi
62183
62184  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62185  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62186
62187    else
62188      # We're on a unix platform. Hooray! :)
62189      path="$FREETYPE_INCLUDE_PATH"
62190      has_space=`$ECHO "$path" | $GREP " "`
62191      if test "x$has_space" != x; then
62192        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62193$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62194        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62195      fi
62196
62197      # Use eval to expand a potential ~
62198      eval path="$path"
62199      if test ! -f "$path" && test ! -d "$path"; then
62200        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62201      fi
62202
62203      if test -d "$path"; then
62204        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62205      else
62206        dir="`$DIRNAME "$path"`"
62207        base="`$BASENAME "$path"`"
62208        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62209      fi
62210    fi
62211  fi
62212
62213      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62214        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62215      else
62216        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62217      fi
62218    fi
62219
62220    if test "x$FREETYPE_LIBS" = x; then
62221
62222  # Only process if variable expands to non-empty
62223
62224  if test "x$FREETYPE_LIB_PATH" != x; then
62225    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62226
62227  # Input might be given as Windows format, start by converting to
62228  # unix format.
62229  path="$FREETYPE_LIB_PATH"
62230  new_path=`$CYGPATH -u "$path"`
62231
62232  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62233  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62234  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62235  # "foo.exe" is OK but "foo" is an error.
62236  #
62237  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62238  # It is also a way to make sure we got the proper file name for the real test later on.
62239  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62240  if test "x$test_shortpath" = x; then
62241    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62242$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62243    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62244  fi
62245
62246  # Call helper function which possibly converts this using DOS-style short mode.
62247  # If so, the updated path is stored in $new_path.
62248
62249  input_path="$new_path"
62250  # Check if we need to convert this using DOS-style short mode. If the path
62251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62252  # take no chances and rewrite it.
62253  # Note: m4 eats our [], so we need to use [ and ] instead.
62254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62255  if test "x$has_forbidden_chars" != x; then
62256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62257    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62258    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62259    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62260      # Going to short mode and back again did indeed matter. Since short mode is
62261      # case insensitive, let's make it lowercase to improve readability.
62262      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62263      # Now convert it back to Unix-style (cygpath)
62264      input_path=`$CYGPATH -u "$shortmode_path"`
62265      new_path="$input_path"
62266    fi
62267  fi
62268
62269  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62270  if test "x$test_cygdrive_prefix" = x; then
62271    # As a simple fix, exclude /usr/bin since it's not a real path.
62272    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62273      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62274      # a path prefixed by /cygdrive for fixpath to work.
62275      new_path="$CYGWIN_ROOT_PATH$input_path"
62276    fi
62277  fi
62278
62279
62280  if test "x$path" != "x$new_path"; then
62281    FREETYPE_LIB_PATH="$new_path"
62282    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62283$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62284  fi
62285
62286    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62287
62288  path="$FREETYPE_LIB_PATH"
62289  has_colon=`$ECHO $path | $GREP ^.:`
62290  new_path="$path"
62291  if test "x$has_colon" = x; then
62292    # Not in mixed or Windows style, start by that.
62293    new_path=`cmd //c echo $path`
62294  fi
62295
62296
62297  input_path="$new_path"
62298  # Check if we need to convert this using DOS-style short mode. If the path
62299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62300  # take no chances and rewrite it.
62301  # Note: m4 eats our [], so we need to use [ and ] instead.
62302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62303  if test "x$has_forbidden_chars" != x; then
62304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62305    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62306  fi
62307
62308
62309  windows_path="$new_path"
62310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62311    unix_path=`$CYGPATH -u "$windows_path"`
62312    new_path="$unix_path"
62313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62315    new_path="$unix_path"
62316  fi
62317
62318  if test "x$path" != "x$new_path"; then
62319    FREETYPE_LIB_PATH="$new_path"
62320    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62321$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62322  fi
62323
62324  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62325  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62326
62327    else
62328      # We're on a unix platform. Hooray! :)
62329      path="$FREETYPE_LIB_PATH"
62330      has_space=`$ECHO "$path" | $GREP " "`
62331      if test "x$has_space" != x; then
62332        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62333$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62334        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62335      fi
62336
62337      # Use eval to expand a potential ~
62338      eval path="$path"
62339      if test ! -f "$path" && test ! -d "$path"; then
62340        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62341      fi
62342
62343      if test -d "$path"; then
62344        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62345      else
62346        dir="`$DIRNAME "$path"`"
62347        base="`$BASENAME "$path"`"
62348        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62349      fi
62350    fi
62351  fi
62352
62353      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62354        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62355      else
62356        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62357      fi
62358    fi
62359
62360    # Try to compile it
62361    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62362$as_echo_n "checking if we can compile and link with freetype... " >&6; }
62363    ac_ext=cpp
62364ac_cpp='$CXXCPP $CPPFLAGS'
62365ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62366ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62367ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62368
62369    PREV_CXXCFLAGS="$CXXFLAGS"
62370    PREV_LIBS="$LIBS"
62371    PREV_CXX="$CXX"
62372    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62373    LIBS="$LIBS $FREETYPE_LIBS"
62374    CXX="$FIXPATH $CXX"
62375    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62376/* end confdefs.h.  */
62377
62378          #include<ft2build.h>
62379          #include FT_FREETYPE_H
62380          int main () {
62381            FT_Init_FreeType(NULL);
62382            return 0;
62383          }
62384
62385_ACEOF
62386if ac_fn_cxx_try_link "$LINENO"; then :
62387
62388          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62389$as_echo "yes" >&6; }
62390
62391else
62392
62393          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62394$as_echo "no" >&6; }
62395          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62396$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62397          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62398$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62399
62400
62401  # Print a helpful message on how to acquire the necessary build dependency.
62402  # freetype is the help tag: freetype, cups, alsa etc
62403  MISSING_DEPENDENCY=freetype
62404
62405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62406    cygwin_help $MISSING_DEPENDENCY
62407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62408    msys_help $MISSING_DEPENDENCY
62409  else
62410    PKGHANDLER_COMMAND=
62411
62412    case $PKGHANDLER in
62413      apt-get)
62414        apt_help     $MISSING_DEPENDENCY ;;
62415      yum)
62416        yum_help     $MISSING_DEPENDENCY ;;
62417      port)
62418        port_help    $MISSING_DEPENDENCY ;;
62419      pkgutil)
62420        pkgutil_help $MISSING_DEPENDENCY ;;
62421      pkgadd)
62422        pkgadd_help  $MISSING_DEPENDENCY ;;
62423    esac
62424
62425    if test "x$PKGHANDLER_COMMAND" != x; then
62426      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62427    fi
62428  fi
62429
62430
62431          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62432
62433
62434fi
62435rm -f core conftest.err conftest.$ac_objext \
62436    conftest$ac_exeext conftest.$ac_ext
62437    CXXCFLAGS="$PREV_CXXFLAGS"
62438    LIBS="$PREV_LIBS"
62439    CXX="$PREV_CXX"
62440    ac_ext=cpp
62441ac_cpp='$CXXCPP $CPPFLAGS'
62442ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62443ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62444ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62445
62446
62447    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62448$as_echo_n "checking if we should bundle freetype... " >&6; }
62449    if test "x$BUNDLE_FREETYPE" = xyes; then
62450      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62451    fi
62452    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62453$as_echo "$BUNDLE_FREETYPE" >&6; }
62454
62455  fi # end freetype needed
62456
62457
62458
62459
62460
62461
62462
62463# Check whether --with-alsa was given.
62464if test "${with_alsa+set}" = set; then :
62465  withval=$with_alsa;
62466fi
62467
62468
62469# Check whether --with-alsa-include was given.
62470if test "${with_alsa_include+set}" = set; then :
62471  withval=$with_alsa_include;
62472fi
62473
62474
62475# Check whether --with-alsa-lib was given.
62476if test "${with_alsa_lib+set}" = set; then :
62477  withval=$with_alsa_lib;
62478fi
62479
62480
62481  if test "x$NEEDS_LIB_ALSA" = xfalse; then
62482    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62483        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62484        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62485      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62486$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62487    fi
62488    ALSA_CFLAGS=
62489    ALSA_LIBS=
62490  else
62491    ALSA_FOUND=no
62492
62493    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62494      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62495    fi
62496
62497    if test "x${with_alsa}" != x; then
62498      ALSA_LIBS="-L${with_alsa}/lib -lasound"
62499      ALSA_CFLAGS="-I${with_alsa}/include"
62500      ALSA_FOUND=yes
62501    fi
62502    if test "x${with_alsa_include}" != x; then
62503      ALSA_CFLAGS="-I${with_alsa_include}"
62504      ALSA_FOUND=yes
62505    fi
62506    if test "x${with_alsa_lib}" != x; then
62507      ALSA_LIBS="-L${with_alsa_lib} -lasound"
62508      ALSA_FOUND=yes
62509    fi
62510    # Do not try pkg-config if we have a sysroot set.
62511    if test "x$SYSROOT" = x; then
62512      if test "x$ALSA_FOUND" = xno; then
62513
62514pkg_failed=no
62515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62516$as_echo_n "checking for ALSA... " >&6; }
62517
62518if test -n "$ALSA_CFLAGS"; then
62519    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62520 elif test -n "$PKG_CONFIG"; then
62521    if test -n "$PKG_CONFIG" && \
62522    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62523  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62524  ac_status=$?
62525  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62526  test $ac_status = 0; }; then
62527  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62528else
62529  pkg_failed=yes
62530fi
62531 else
62532    pkg_failed=untried
62533fi
62534if test -n "$ALSA_LIBS"; then
62535    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
62536 elif test -n "$PKG_CONFIG"; then
62537    if test -n "$PKG_CONFIG" && \
62538    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62539  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62540  ac_status=$?
62541  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62542  test $ac_status = 0; }; then
62543  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
62544else
62545  pkg_failed=yes
62546fi
62547 else
62548    pkg_failed=untried
62549fi
62550
62551
62552
62553if test $pkg_failed = yes; then
62554
62555if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62556        _pkg_short_errors_supported=yes
62557else
62558        _pkg_short_errors_supported=no
62559fi
62560        if test $_pkg_short_errors_supported = yes; then
62561	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
62562        else
62563	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
62564        fi
62565	# Put the nasty error message in config.log where it belongs
62566	echo "$ALSA_PKG_ERRORS" >&5
62567
62568	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62569$as_echo "no" >&6; }
62570                ALSA_FOUND=no
62571elif test $pkg_failed = untried; then
62572	ALSA_FOUND=no
62573else
62574	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
62575	ALSA_LIBS=$pkg_cv_ALSA_LIBS
62576        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62577$as_echo "yes" >&6; }
62578	ALSA_FOUND=yes
62579fi
62580      fi
62581    fi
62582    if test "x$ALSA_FOUND" = xno; then
62583      for ac_header in alsa/asoundlib.h
62584do :
62585  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
62586if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
62587  cat >>confdefs.h <<_ACEOF
62588#define HAVE_ALSA_ASOUNDLIB_H 1
62589_ACEOF
62590
62591            ALSA_FOUND=yes
62592            ALSA_CFLAGS=-Iignoreme
62593            ALSA_LIBS=-lasound
62594            DEFAULT_ALSA=yes
62595
62596else
62597  ALSA_FOUND=no
62598
62599fi
62600
62601done
62602
62603    fi
62604    if test "x$ALSA_FOUND" = xno; then
62605
62606  # Print a helpful message on how to acquire the necessary build dependency.
62607  # alsa is the help tag: freetype, cups, alsa etc
62608  MISSING_DEPENDENCY=alsa
62609
62610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62611    cygwin_help $MISSING_DEPENDENCY
62612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62613    msys_help $MISSING_DEPENDENCY
62614  else
62615    PKGHANDLER_COMMAND=
62616
62617    case $PKGHANDLER in
62618      apt-get)
62619        apt_help     $MISSING_DEPENDENCY ;;
62620      yum)
62621        yum_help     $MISSING_DEPENDENCY ;;
62622      port)
62623        port_help    $MISSING_DEPENDENCY ;;
62624      pkgutil)
62625        pkgutil_help $MISSING_DEPENDENCY ;;
62626      pkgadd)
62627        pkgadd_help  $MISSING_DEPENDENCY ;;
62628    esac
62629
62630    if test "x$PKGHANDLER_COMMAND" != x; then
62631      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62632    fi
62633  fi
62634
62635      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
62636    fi
62637  fi
62638
62639
62640
62641
62642
62643
62644# Check whether --with-libffi was given.
62645if test "${with_libffi+set}" = set; then :
62646  withval=$with_libffi;
62647fi
62648
62649
62650# Check whether --with-libffi-include was given.
62651if test "${with_libffi_include+set}" = set; then :
62652  withval=$with_libffi_include;
62653fi
62654
62655
62656# Check whether --with-libffi-lib was given.
62657if test "${with_libffi_lib+set}" = set; then :
62658  withval=$with_libffi_lib;
62659fi
62660
62661
62662  if test "x$NEEDS_LIB_FFI" = xfalse; then
62663    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
62664        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
62665        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
62666      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
62667$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
62668    fi
62669    LIBFFI_CFLAGS=
62670    LIBFFI_LIBS=
62671  else
62672    LIBFFI_FOUND=no
62673
62674    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
62675      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
62676    fi
62677
62678    if test "x${with_libffi}" != x; then
62679      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
62680      LIBFFI_CFLAGS="-I${with_libffi}/include"
62681      LIBFFI_FOUND=yes
62682    fi
62683    if test "x${with_libffi_include}" != x; then
62684      LIBFFI_CFLAGS="-I${with_libffi_include}"
62685      LIBFFI_FOUND=yes
62686    fi
62687    if test "x${with_libffi_lib}" != x; then
62688      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
62689      LIBFFI_FOUND=yes
62690    fi
62691    # Do not try pkg-config if we have a sysroot set.
62692    if test "x$SYSROOT" = x; then
62693      if test "x$LIBFFI_FOUND" = xno; then
62694        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
62695
62696pkg_failed=no
62697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
62698$as_echo_n "checking for LIBFFI... " >&6; }
62699
62700if test -n "$LIBFFI_CFLAGS"; then
62701    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
62702 elif test -n "$PKG_CONFIG"; then
62703    if test -n "$PKG_CONFIG" && \
62704    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62705  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62706  ac_status=$?
62707  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62708  test $ac_status = 0; }; then
62709  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
62710else
62711  pkg_failed=yes
62712fi
62713 else
62714    pkg_failed=untried
62715fi
62716if test -n "$LIBFFI_LIBS"; then
62717    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
62718 elif test -n "$PKG_CONFIG"; then
62719    if test -n "$PKG_CONFIG" && \
62720    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62721  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62722  ac_status=$?
62723  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62724  test $ac_status = 0; }; then
62725  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
62726else
62727  pkg_failed=yes
62728fi
62729 else
62730    pkg_failed=untried
62731fi
62732
62733
62734
62735if test $pkg_failed = yes; then
62736
62737if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62738        _pkg_short_errors_supported=yes
62739else
62740        _pkg_short_errors_supported=no
62741fi
62742        if test $_pkg_short_errors_supported = yes; then
62743	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
62744        else
62745	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
62746        fi
62747	# Put the nasty error message in config.log where it belongs
62748	echo "$LIBFFI_PKG_ERRORS" >&5
62749
62750	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62751$as_echo "no" >&6; }
62752                LIBFFI_FOUND=no
62753elif test $pkg_failed = untried; then
62754	LIBFFI_FOUND=no
62755else
62756	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
62757	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
62758        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62759$as_echo "yes" >&6; }
62760	LIBFFI_FOUND=yes
62761fi
62762      fi
62763    fi
62764    if test "x$LIBFFI_FOUND" = xno; then
62765      for ac_header in ffi.h
62766do :
62767  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
62768if test "x$ac_cv_header_ffi_h" = xyes; then :
62769  cat >>confdefs.h <<_ACEOF
62770#define HAVE_FFI_H 1
62771_ACEOF
62772
62773            LIBFFI_FOUND=yes
62774            LIBFFI_CFLAGS=
62775            LIBFFI_LIBS=-lffi
62776
62777else
62778  LIBFFI_FOUND=no
62779
62780fi
62781
62782done
62783
62784    fi
62785    if test "x$LIBFFI_FOUND" = xno; then
62786
62787  # Print a helpful message on how to acquire the necessary build dependency.
62788  # ffi is the help tag: freetype, cups, alsa etc
62789  MISSING_DEPENDENCY=ffi
62790
62791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62792    cygwin_help $MISSING_DEPENDENCY
62793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62794    msys_help $MISSING_DEPENDENCY
62795  else
62796    PKGHANDLER_COMMAND=
62797
62798    case $PKGHANDLER in
62799      apt-get)
62800        apt_help     $MISSING_DEPENDENCY ;;
62801      yum)
62802        yum_help     $MISSING_DEPENDENCY ;;
62803      port)
62804        port_help    $MISSING_DEPENDENCY ;;
62805      pkgutil)
62806        pkgutil_help $MISSING_DEPENDENCY ;;
62807      pkgadd)
62808        pkgadd_help  $MISSING_DEPENDENCY ;;
62809    esac
62810
62811    if test "x$PKGHANDLER_COMMAND" != x; then
62812      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62813    fi
62814  fi
62815
62816      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
62817    fi
62818
62819    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
62820$as_echo_n "checking if libffi works... " >&6; }
62821    ac_ext=c
62822ac_cpp='$CPP $CPPFLAGS'
62823ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62824ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62825ac_compiler_gnu=$ac_cv_c_compiler_gnu
62826
62827    OLD_CFLAGS="$CFLAGS"
62828    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
62829    OLD_LIBS="$LIBS"
62830    LIBS="$LIBS $LIBFFI_LIBS"
62831    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62832/* end confdefs.h.  */
62833#include <ffi.h>
62834int
62835main ()
62836{
62837
62838          ffi_call(NULL, NULL, NULL, NULL);
62839          return 0;
62840
62841  ;
62842  return 0;
62843}
62844_ACEOF
62845if ac_fn_c_try_link "$LINENO"; then :
62846  LIBFFI_WORKS=yes
62847else
62848  LIBFFI_WORKS=no
62849
62850fi
62851rm -f core conftest.err conftest.$ac_objext \
62852    conftest$ac_exeext conftest.$ac_ext
62853    CFLAGS="$OLD_CFLAGS"
62854    LIBS="$OLD_LIBS"
62855    ac_ext=cpp
62856ac_cpp='$CXXCPP $CPPFLAGS'
62857ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62858ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62859ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62860
62861    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
62862$as_echo "$LIBFFI_WORKS" >&6; }
62863
62864    if test "x$LIBFFI_WORKS" = xno; then
62865
62866  # Print a helpful message on how to acquire the necessary build dependency.
62867  # ffi is the help tag: freetype, cups, alsa etc
62868  MISSING_DEPENDENCY=ffi
62869
62870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62871    cygwin_help $MISSING_DEPENDENCY
62872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62873    msys_help $MISSING_DEPENDENCY
62874  else
62875    PKGHANDLER_COMMAND=
62876
62877    case $PKGHANDLER in
62878      apt-get)
62879        apt_help     $MISSING_DEPENDENCY ;;
62880      yum)
62881        yum_help     $MISSING_DEPENDENCY ;;
62882      port)
62883        port_help    $MISSING_DEPENDENCY ;;
62884      pkgutil)
62885        pkgutil_help $MISSING_DEPENDENCY ;;
62886      pkgadd)
62887        pkgadd_help  $MISSING_DEPENDENCY ;;
62888    esac
62889
62890    if test "x$PKGHANDLER_COMMAND" != x; then
62891      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62892    fi
62893  fi
62894
62895      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
62896    fi
62897  fi
62898
62899
62900
62901
62902
62903  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
62904    # Extract the first word of "llvm-config", so it can be a program name with args.
62905set dummy llvm-config; ac_word=$2
62906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
62907$as_echo_n "checking for $ac_word... " >&6; }
62908if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
62909  $as_echo_n "(cached) " >&6
62910else
62911  if test -n "$LLVM_CONFIG"; then
62912  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
62913else
62914as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
62915for as_dir in $PATH
62916do
62917  IFS=$as_save_IFS
62918  test -z "$as_dir" && as_dir=.
62919    for ac_exec_ext in '' $ac_executable_extensions; do
62920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
62921    ac_cv_prog_LLVM_CONFIG="llvm-config"
62922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
62923    break 2
62924  fi
62925done
62926  done
62927IFS=$as_save_IFS
62928
62929fi
62930fi
62931LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
62932if test -n "$LLVM_CONFIG"; then
62933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
62934$as_echo "$LLVM_CONFIG" >&6; }
62935else
62936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62937$as_echo "no" >&6; }
62938fi
62939
62940
62941
62942    if test "x$LLVM_CONFIG" != xllvm-config; then
62943      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
62944    fi
62945
62946    llvm_components="jit mcjit engine nativecodegen native"
62947    unset LLVM_CFLAGS
62948    for flag in $("$LLVM_CONFIG" --cxxflags); do
62949      if echo "${flag}" | grep -q '^-[ID]'; then
62950        if test "${flag}" != "-D_DEBUG" ; then
62951          if test "${LLVM_CFLAGS}" != "" ; then
62952            LLVM_CFLAGS="${LLVM_CFLAGS} "
62953          fi
62954          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
62955        fi
62956      fi
62957    done
62958    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
62959    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
62960
62961    unset LLVM_LDFLAGS
62962    for flag in $("${LLVM_CONFIG}" --ldflags); do
62963      if echo "${flag}" | grep -q '^-L'; then
62964        if test "${LLVM_LDFLAGS}" != ""; then
62965          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
62966        fi
62967        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
62968      fi
62969    done
62970
62971    unset LLVM_LIBS
62972    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
62973      if echo "${flag}" | grep -q '^-l'; then
62974        if test "${LLVM_LIBS}" != ""; then
62975          LLVM_LIBS="${LLVM_LIBS} "
62976        fi
62977        LLVM_LIBS="${LLVM_LIBS}${flag}"
62978      fi
62979    done
62980
62981    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
62982    # always properly detect -ltinfo
62983    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
62984
62985
62986
62987
62988  fi
62989
62990
62991
62992# Check whether --with-libjpeg was given.
62993if test "${with_libjpeg+set}" = set; then :
62994  withval=$with_libjpeg;
62995fi
62996
62997
62998  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
62999$as_echo_n "checking for which libjpeg to use... " >&6; }
63000  # default is bundled
63001  DEFAULT_LIBJPEG=bundled
63002  # if user didn't specify, use DEFAULT_LIBJPEG
63003  if test "x${with_libjpeg}" = "x"; then
63004    with_libjpeg=${DEFAULT_LIBJPEG}
63005  fi
63006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63007$as_echo "${with_libjpeg}" >&6; }
63008
63009  if test "x${with_libjpeg}" = "xbundled"; then
63010    USE_EXTERNAL_LIBJPEG=false
63011  elif test "x${with_libjpeg}" = "xsystem"; then
63012    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63013if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63014
63015else
63016   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63017fi
63018
63019
63020    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63021$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63022if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63023  $as_echo_n "(cached) " >&6
63024else
63025  ac_check_lib_save_LIBS=$LIBS
63026LIBS="-ljpeg  $LIBS"
63027cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63028/* end confdefs.h.  */
63029
63030/* Override any GCC internal prototype to avoid an error.
63031   Use char because int might match the return type of a GCC
63032   builtin and then its argument prototype would still apply.  */
63033#ifdef __cplusplus
63034extern "C"
63035#endif
63036char jpeg_CreateDecompress ();
63037int
63038main ()
63039{
63040return jpeg_CreateDecompress ();
63041  ;
63042  return 0;
63043}
63044_ACEOF
63045if ac_fn_cxx_try_link "$LINENO"; then :
63046  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63047else
63048  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63049fi
63050rm -f core conftest.err conftest.$ac_objext \
63051    conftest$ac_exeext conftest.$ac_ext
63052LIBS=$ac_check_lib_save_LIBS
63053fi
63054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63055$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63056if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63057  cat >>confdefs.h <<_ACEOF
63058#define HAVE_LIBJPEG 1
63059_ACEOF
63060
63061  LIBS="-ljpeg $LIBS"
63062
63063else
63064   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63065fi
63066
63067
63068    USE_EXTERNAL_LIBJPEG=true
63069  else
63070    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63071  fi
63072
63073
63074
63075
63076
63077# Check whether --with-giflib was given.
63078if test "${with_giflib+set}" = set; then :
63079  withval=$with_giflib;
63080fi
63081
63082
63083  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63084$as_echo_n "checking for which giflib to use... " >&6; }
63085  # default is bundled
63086  DEFAULT_GIFLIB=bundled
63087  # if user didn't specify, use DEFAULT_GIFLIB
63088  if test "x${with_giflib}" = "x"; then
63089    with_giflib=${DEFAULT_GIFLIB}
63090  fi
63091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63092$as_echo "${with_giflib}" >&6; }
63093
63094  if test "x${with_giflib}" = "xbundled"; then
63095    USE_EXTERNAL_LIBGIF=false
63096  elif test "x${with_giflib}" = "xsystem"; then
63097    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63098if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63099
63100else
63101   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63102fi
63103
63104
63105    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63106$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63107if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63108  $as_echo_n "(cached) " >&6
63109else
63110  ac_check_lib_save_LIBS=$LIBS
63111LIBS="-lgif  $LIBS"
63112cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63113/* end confdefs.h.  */
63114
63115/* Override any GCC internal prototype to avoid an error.
63116   Use char because int might match the return type of a GCC
63117   builtin and then its argument prototype would still apply.  */
63118#ifdef __cplusplus
63119extern "C"
63120#endif
63121char DGifGetCode ();
63122int
63123main ()
63124{
63125return DGifGetCode ();
63126  ;
63127  return 0;
63128}
63129_ACEOF
63130if ac_fn_cxx_try_link "$LINENO"; then :
63131  ac_cv_lib_gif_DGifGetCode=yes
63132else
63133  ac_cv_lib_gif_DGifGetCode=no
63134fi
63135rm -f core conftest.err conftest.$ac_objext \
63136    conftest$ac_exeext conftest.$ac_ext
63137LIBS=$ac_check_lib_save_LIBS
63138fi
63139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63140$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63141if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63142  cat >>confdefs.h <<_ACEOF
63143#define HAVE_LIBGIF 1
63144_ACEOF
63145
63146  LIBS="-lgif $LIBS"
63147
63148else
63149   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63150fi
63151
63152
63153    USE_EXTERNAL_LIBGIF=true
63154  else
63155    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63156  fi
63157
63158
63159
63160
63161
63162# Check whether --with-libpng was given.
63163if test "${with_libpng+set}" = set; then :
63164  withval=$with_libpng;
63165fi
63166
63167
63168  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63169$as_echo_n "checking for which libpng to use... " >&6; }
63170
63171  # default is bundled
63172  DEFAULT_LIBPNG=bundled
63173  # if user didn't specify, use DEFAULT_LIBPNG
63174  if test "x${with_libpng}" = "x"; then
63175      with_libpng=${DEFAULT_LIBPNG}
63176  fi
63177
63178  if test "x${with_libpng}" = "xbundled"; then
63179      USE_EXTERNAL_LIBPNG=false
63180      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63181$as_echo "bundled" >&6; }
63182  elif test "x${with_libpng}" = "xsystem"; then
63183
63184pkg_failed=no
63185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63186$as_echo_n "checking for PNG... " >&6; }
63187
63188if test -n "$PNG_CFLAGS"; then
63189    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63190 elif test -n "$PKG_CONFIG"; then
63191    if test -n "$PKG_CONFIG" && \
63192    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63193  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63194  ac_status=$?
63195  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63196  test $ac_status = 0; }; then
63197  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63198else
63199  pkg_failed=yes
63200fi
63201 else
63202    pkg_failed=untried
63203fi
63204if test -n "$PNG_LIBS"; then
63205    pkg_cv_PNG_LIBS="$PNG_LIBS"
63206 elif test -n "$PKG_CONFIG"; then
63207    if test -n "$PKG_CONFIG" && \
63208    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63209  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63210  ac_status=$?
63211  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63212  test $ac_status = 0; }; then
63213  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63214else
63215  pkg_failed=yes
63216fi
63217 else
63218    pkg_failed=untried
63219fi
63220
63221
63222
63223if test $pkg_failed = yes; then
63224
63225if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63226        _pkg_short_errors_supported=yes
63227else
63228        _pkg_short_errors_supported=no
63229fi
63230        if test $_pkg_short_errors_supported = yes; then
63231	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63232        else
63233	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63234        fi
63235	# Put the nasty error message in config.log where it belongs
63236	echo "$PNG_PKG_ERRORS" >&5
63237
63238	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63239$as_echo "no" >&6; }
63240                 LIBPNG_FOUND=no
63241elif test $pkg_failed = untried; then
63242	 LIBPNG_FOUND=no
63243else
63244	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63245	PNG_LIBS=$pkg_cv_PNG_LIBS
63246        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63247$as_echo "yes" >&6; }
63248	 LIBPNG_FOUND=yes
63249fi
63250      if test "x${LIBPNG_FOUND}" = "xyes"; then
63251          USE_EXTERNAL_LIBPNG=true
63252          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63253$as_echo "system" >&6; }
63254      else
63255          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63256$as_echo "system not found" >&6; }
63257          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63258      fi
63259  else
63260      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63261  fi
63262
63263
63264
63265
63266
63267# Check whether --with-zlib was given.
63268if test "${with_zlib+set}" = set; then :
63269  withval=$with_zlib;
63270fi
63271
63272
63273  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63274$as_echo_n "checking for compress in -lz... " >&6; }
63275if ${ac_cv_lib_z_compress+:} false; then :
63276  $as_echo_n "(cached) " >&6
63277else
63278  ac_check_lib_save_LIBS=$LIBS
63279LIBS="-lz  $LIBS"
63280cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63281/* end confdefs.h.  */
63282
63283/* Override any GCC internal prototype to avoid an error.
63284   Use char because int might match the return type of a GCC
63285   builtin and then its argument prototype would still apply.  */
63286#ifdef __cplusplus
63287extern "C"
63288#endif
63289char compress ();
63290int
63291main ()
63292{
63293return compress ();
63294  ;
63295  return 0;
63296}
63297_ACEOF
63298if ac_fn_cxx_try_link "$LINENO"; then :
63299  ac_cv_lib_z_compress=yes
63300else
63301  ac_cv_lib_z_compress=no
63302fi
63303rm -f core conftest.err conftest.$ac_objext \
63304    conftest$ac_exeext conftest.$ac_ext
63305LIBS=$ac_check_lib_save_LIBS
63306fi
63307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63308$as_echo "$ac_cv_lib_z_compress" >&6; }
63309if test "x$ac_cv_lib_z_compress" = xyes; then :
63310   ZLIB_FOUND=yes
63311else
63312   ZLIB_FOUND=no
63313fi
63314
63315
63316  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63317$as_echo_n "checking for which zlib to use... " >&6; }
63318
63319  DEFAULT_ZLIB=system
63320  if test "x$OPENJDK_TARGET_OS" = xwindows; then
63321    # On windows default is bundled...on others default is system
63322    DEFAULT_ZLIB=bundled
63323  fi
63324
63325  if test "x${ZLIB_FOUND}" != "xyes"; then
63326    # If we don't find any system...set default to bundled
63327    DEFAULT_ZLIB=bundled
63328  fi
63329
63330  # If user didn't specify, use DEFAULT_ZLIB
63331  if test "x${with_zlib}" = "x"; then
63332    with_zlib=${DEFAULT_ZLIB}
63333  fi
63334
63335  if test "x${with_zlib}" = "xbundled"; then
63336    USE_EXTERNAL_LIBZ=false
63337    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63338$as_echo "bundled" >&6; }
63339  elif test "x${with_zlib}" = "xsystem"; then
63340    if test "x${ZLIB_FOUND}" = "xyes"; then
63341      USE_EXTERNAL_LIBZ=true
63342      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63343$as_echo "system" >&6; }
63344    else
63345      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63346$as_echo "system not found" >&6; }
63347      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63348    fi
63349  else
63350    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63351  fi
63352
63353
63354
63355
63356
63357# Check whether --with-lcms was given.
63358if test "${with_lcms+set}" = set; then :
63359  withval=$with_lcms;
63360fi
63361
63362
63363  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63364$as_echo_n "checking for which lcms to use... " >&6; }
63365
63366  DEFAULT_LCMS=bundled
63367  # If user didn't specify, use DEFAULT_LCMS
63368  if test "x${with_lcms}" = "x"; then
63369      with_lcms=${DEFAULT_LCMS}
63370  fi
63371
63372  if test "x${with_lcms}" = "xbundled"; then
63373    USE_EXTERNAL_LCMS=false
63374    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63375$as_echo "bundled" >&6; }
63376  elif test "x${with_lcms}" = "xsystem"; then
63377    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63378$as_echo "system" >&6; }
63379
63380pkg_failed=no
63381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63382$as_echo_n "checking for LCMS... " >&6; }
63383
63384if test -n "$LCMS_CFLAGS"; then
63385    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63386 elif test -n "$PKG_CONFIG"; then
63387    if test -n "$PKG_CONFIG" && \
63388    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63389  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63390  ac_status=$?
63391  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63392  test $ac_status = 0; }; then
63393  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63394else
63395  pkg_failed=yes
63396fi
63397 else
63398    pkg_failed=untried
63399fi
63400if test -n "$LCMS_LIBS"; then
63401    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63402 elif test -n "$PKG_CONFIG"; then
63403    if test -n "$PKG_CONFIG" && \
63404    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63405  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63406  ac_status=$?
63407  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63408  test $ac_status = 0; }; then
63409  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63410else
63411  pkg_failed=yes
63412fi
63413 else
63414    pkg_failed=untried
63415fi
63416
63417
63418
63419if test $pkg_failed = yes; then
63420
63421if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63422        _pkg_short_errors_supported=yes
63423else
63424        _pkg_short_errors_supported=no
63425fi
63426        if test $_pkg_short_errors_supported = yes; then
63427	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63428        else
63429	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63430        fi
63431	# Put the nasty error message in config.log where it belongs
63432	echo "$LCMS_PKG_ERRORS" >&5
63433
63434	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63435$as_echo "no" >&6; }
63436                LCMS_FOUND=no
63437elif test $pkg_failed = untried; then
63438	LCMS_FOUND=no
63439else
63440	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63441	LCMS_LIBS=$pkg_cv_LCMS_LIBS
63442        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63443$as_echo "yes" >&6; }
63444	LCMS_FOUND=yes
63445fi
63446    if test "x${LCMS_FOUND}" = "xyes"; then
63447      USE_EXTERNAL_LCMS=true
63448    else
63449      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63450    fi
63451  else
63452    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63453  fi
63454
63455
63456
63457
63458
63459
63460
63461
63462
63463
63464
63465  # Setup libm (the maths library)
63466  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63467    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63468$as_echo_n "checking for cos in -lm... " >&6; }
63469if ${ac_cv_lib_m_cos+:} false; then :
63470  $as_echo_n "(cached) " >&6
63471else
63472  ac_check_lib_save_LIBS=$LIBS
63473LIBS="-lm  $LIBS"
63474cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63475/* end confdefs.h.  */
63476
63477/* Override any GCC internal prototype to avoid an error.
63478   Use char because int might match the return type of a GCC
63479   builtin and then its argument prototype would still apply.  */
63480#ifdef __cplusplus
63481extern "C"
63482#endif
63483char cos ();
63484int
63485main ()
63486{
63487return cos ();
63488  ;
63489  return 0;
63490}
63491_ACEOF
63492if ac_fn_cxx_try_link "$LINENO"; then :
63493  ac_cv_lib_m_cos=yes
63494else
63495  ac_cv_lib_m_cos=no
63496fi
63497rm -f core conftest.err conftest.$ac_objext \
63498    conftest$ac_exeext conftest.$ac_ext
63499LIBS=$ac_check_lib_save_LIBS
63500fi
63501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
63502$as_echo "$ac_cv_lib_m_cos" >&6; }
63503if test "x$ac_cv_lib_m_cos" = xyes; then :
63504  cat >>confdefs.h <<_ACEOF
63505#define HAVE_LIBM 1
63506_ACEOF
63507
63508  LIBS="-lm $LIBS"
63509
63510else
63511
63512        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
63513$as_echo "$as_me: Maths library was not found" >&6;}
63514
63515fi
63516
63517    LIBM="-lm"
63518  else
63519    LIBM=""
63520  fi
63521
63522
63523  # Setup libdl (for dynamic library loading)
63524  save_LIBS="$LIBS"
63525  LIBS=""
63526  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
63527$as_echo_n "checking for dlopen in -ldl... " >&6; }
63528if ${ac_cv_lib_dl_dlopen+:} false; then :
63529  $as_echo_n "(cached) " >&6
63530else
63531  ac_check_lib_save_LIBS=$LIBS
63532LIBS="-ldl  $LIBS"
63533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63534/* end confdefs.h.  */
63535
63536/* Override any GCC internal prototype to avoid an error.
63537   Use char because int might match the return type of a GCC
63538   builtin and then its argument prototype would still apply.  */
63539#ifdef __cplusplus
63540extern "C"
63541#endif
63542char dlopen ();
63543int
63544main ()
63545{
63546return dlopen ();
63547  ;
63548  return 0;
63549}
63550_ACEOF
63551if ac_fn_cxx_try_link "$LINENO"; then :
63552  ac_cv_lib_dl_dlopen=yes
63553else
63554  ac_cv_lib_dl_dlopen=no
63555fi
63556rm -f core conftest.err conftest.$ac_objext \
63557    conftest$ac_exeext conftest.$ac_ext
63558LIBS=$ac_check_lib_save_LIBS
63559fi
63560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
63561$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
63562if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
63563  cat >>confdefs.h <<_ACEOF
63564#define HAVE_LIBDL 1
63565_ACEOF
63566
63567  LIBS="-ldl $LIBS"
63568
63569fi
63570
63571  LIBDL="$LIBS"
63572
63573  LIBS="$save_LIBS"
63574
63575  # Deprecated libraries, keep the flags for backwards compatibility
63576  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
63577
63578
63579# Check whether --with-dxsdk was given.
63580if test "${with_dxsdk+set}" = set; then :
63581  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
63582$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
63583fi
63584
63585
63586
63587
63588# Check whether --with-dxsdk-lib was given.
63589if test "${with_dxsdk_lib+set}" = set; then :
63590  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
63591$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
63592fi
63593
63594
63595
63596
63597# Check whether --with-dxsdk-include was given.
63598if test "${with_dxsdk_include+set}" = set; then :
63599  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
63600$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
63601fi
63602
63603
63604  fi
63605
63606  # Control if libzip can use mmap. Available for purposes of overriding.
63607  LIBZIP_CAN_USE_MMAP=true
63608
63609
63610
63611  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
63612    # Find the root of the Solaris Studio installation from the compiler path
63613    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
63614    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
63615    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
63616$as_echo_n "checking for libstlport.so.1... " >&6; }
63617    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
63618      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
63619      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
63620    fi
63621    if test -f "$STLPORT_LIB"; then
63622      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
63623$as_echo "yes, $STLPORT_LIB" >&6; }
63624
63625  # Only process if variable expands to non-empty
63626
63627  if test "x$STLPORT_LIB" != x; then
63628    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63629
63630  # Input might be given as Windows format, start by converting to
63631  # unix format.
63632  path="$STLPORT_LIB"
63633  new_path=`$CYGPATH -u "$path"`
63634
63635  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63636  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63637  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63638  # "foo.exe" is OK but "foo" is an error.
63639  #
63640  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63641  # It is also a way to make sure we got the proper file name for the real test later on.
63642  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63643  if test "x$test_shortpath" = x; then
63644    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63645$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63646    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
63647  fi
63648
63649  # Call helper function which possibly converts this using DOS-style short mode.
63650  # If so, the updated path is stored in $new_path.
63651
63652  input_path="$new_path"
63653  # Check if we need to convert this using DOS-style short mode. If the path
63654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63655  # take no chances and rewrite it.
63656  # Note: m4 eats our [], so we need to use [ and ] instead.
63657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63658  if test "x$has_forbidden_chars" != x; then
63659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63660    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63661    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63662    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63663      # Going to short mode and back again did indeed matter. Since short mode is
63664      # case insensitive, let's make it lowercase to improve readability.
63665      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63666      # Now convert it back to Unix-style (cygpath)
63667      input_path=`$CYGPATH -u "$shortmode_path"`
63668      new_path="$input_path"
63669    fi
63670  fi
63671
63672  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63673  if test "x$test_cygdrive_prefix" = x; then
63674    # As a simple fix, exclude /usr/bin since it's not a real path.
63675    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63676      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63677      # a path prefixed by /cygdrive for fixpath to work.
63678      new_path="$CYGWIN_ROOT_PATH$input_path"
63679    fi
63680  fi
63681
63682
63683  if test "x$path" != "x$new_path"; then
63684    STLPORT_LIB="$new_path"
63685    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63686$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63687  fi
63688
63689    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63690
63691  path="$STLPORT_LIB"
63692  has_colon=`$ECHO $path | $GREP ^.:`
63693  new_path="$path"
63694  if test "x$has_colon" = x; then
63695    # Not in mixed or Windows style, start by that.
63696    new_path=`cmd //c echo $path`
63697  fi
63698
63699
63700  input_path="$new_path"
63701  # Check if we need to convert this using DOS-style short mode. If the path
63702  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63703  # take no chances and rewrite it.
63704  # Note: m4 eats our [], so we need to use [ and ] instead.
63705  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63706  if test "x$has_forbidden_chars" != x; then
63707    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63708    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63709  fi
63710
63711
63712  windows_path="$new_path"
63713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63714    unix_path=`$CYGPATH -u "$windows_path"`
63715    new_path="$unix_path"
63716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63717    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63718    new_path="$unix_path"
63719  fi
63720
63721  if test "x$path" != "x$new_path"; then
63722    STLPORT_LIB="$new_path"
63723    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63724$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63725  fi
63726
63727  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63728  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63729
63730    else
63731      # We're on a unix platform. Hooray! :)
63732      path="$STLPORT_LIB"
63733      has_space=`$ECHO "$path" | $GREP " "`
63734      if test "x$has_space" != x; then
63735        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63736$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63737        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63738      fi
63739
63740      # Use eval to expand a potential ~
63741      eval path="$path"
63742      if test ! -f "$path" && test ! -d "$path"; then
63743        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
63744      fi
63745
63746      if test -d "$path"; then
63747        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
63748      else
63749        dir="`$DIRNAME "$path"`"
63750        base="`$BASENAME "$path"`"
63751        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
63752      fi
63753    fi
63754  fi
63755
63756    else
63757      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
63758$as_echo "no, not found at $STLPORT_LIB" >&6; }
63759      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
63760    fi
63761
63762  fi
63763
63764
63765
63766
63767
63768
63769
63770
63771
63772
63773
63774
63775
63776
63777###############################################################################
63778#
63779# We need to do some final tweaking, when everything else is done.
63780#
63781###############################################################################
63782
63783
63784  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
63785$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
63786
63787  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
63788    ENABLE_INTREE_EC=yes
63789    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63790$as_echo "yes" >&6; }
63791  else
63792    ENABLE_INTREE_EC=no
63793    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63794$as_echo "no" >&6; }
63795  fi
63796
63797
63798
63799
63800  # Check whether --enable-jtreg-failure-handler was given.
63801if test "${enable_jtreg_failure_handler+set}" = set; then :
63802  enableval=$enable_jtreg_failure_handler;
63803fi
63804
63805
63806  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
63807$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
63808
63809  if test "x$enable_jtreg_failure_handler" = "xyes"; then
63810    if test "x$JT_HOME" = "x"; then
63811      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
63812    else
63813      BUILD_FAILURE_HANDLER=true
63814      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63815$as_echo "yes, forced" >&6; }
63816    fi
63817  elif test "x$enable_jtreg_failure_handler" = "xno"; then
63818    BUILD_FAILURE_HANDLER=false
63819    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63820$as_echo "no, forced" >&6; }
63821  elif test "x$enable_jtreg_failure_handler" = "xauto" \
63822      || test "x$enable_jtreg_failure_handler" = "x"; then
63823    if test "x$JT_HOME" = "x"; then
63824      BUILD_FAILURE_HANDLER=false
63825      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
63826$as_echo "no, missing jtreg" >&6; }
63827    else
63828      BUILD_FAILURE_HANDLER=true
63829      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
63830$as_echo "yes, jtreg present" >&6; }
63831    fi
63832  else
63833    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
63834  fi
63835
63836
63837
63838
63839  # Check whether --enable-generate-classlist was given.
63840if test "${enable_generate_classlist+set}" = set; then :
63841  enableval=$enable_generate_classlist;
63842fi
63843
63844
63845  # Check if it's likely that it's possible to generate the classlist. Depending
63846  # on exact jvm configuration it could be possible anyway.
63847  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
63848    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
63849  else
63850    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
63851  fi
63852
63853  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
63854$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
63855  if test "x$enable_generate_classlist" = "xyes"; then
63856    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63857$as_echo "yes, forced" >&6; }
63858    ENABLE_GENERATE_CLASSLIST="true"
63859    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
63860      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
63861$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
63862    fi
63863  elif test "x$enable_generate_classlist" = "xno"; then
63864    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63865$as_echo "no, forced" >&6; }
63866    ENABLE_GENERATE_CLASSLIST="false"
63867  elif test "x$enable_generate_classlist" = "x"; then
63868    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
63869      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63870$as_echo "yes" >&6; }
63871      ENABLE_GENERATE_CLASSLIST="true"
63872    else
63873      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63874$as_echo "no" >&6; }
63875      ENABLE_GENERATE_CLASSLIST="false"
63876    fi
63877  else
63878    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
63879  fi
63880
63881
63882
63883
63884###############################################################################
63885#
63886# Configure parts of the build that only affect the build performance,
63887# not the result.
63888#
63889###############################################################################
63890
63891
63892  # How many cores do we have on this build system?
63893
63894# Check whether --with-num-cores was given.
63895if test "${with_num_cores+set}" = set; then :
63896  withval=$with_num_cores;
63897fi
63898
63899  if test "x$with_num_cores" = x; then
63900    # The number of cores were not specified, try to probe them.
63901
63902  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
63903$as_echo_n "checking for number of cores... " >&6; }
63904  NUM_CORES=1
63905  FOUND_CORES=no
63906
63907  if test -f /proc/cpuinfo; then
63908    # Looks like a Linux (or cygwin) system
63909    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
63910    FOUND_CORES=yes
63911  elif test -x /usr/sbin/psrinfo; then
63912    # Looks like a Solaris system
63913    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
63914    FOUND_CORES=yes
63915  elif test -x /usr/sbin/sysctl; then
63916    # Looks like a MacOSX system
63917    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
63918    FOUND_CORES=yes
63919  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
63920    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
63921    FOUND_CORES=yes
63922  elif test -n "$NUMBER_OF_PROCESSORS"; then
63923    # On windows, look in the env
63924    NUM_CORES=$NUMBER_OF_PROCESSORS
63925    FOUND_CORES=yes
63926  fi
63927
63928  if test "x$FOUND_CORES" = xyes; then
63929    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
63930$as_echo "$NUM_CORES" >&6; }
63931  else
63932    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
63933$as_echo "could not detect number of cores, defaulting to 1" >&6; }
63934    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
63935$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
63936  fi
63937
63938  else
63939    NUM_CORES=$with_num_cores
63940  fi
63941
63942
63943
63944  # How much memory do we have on this build system?
63945
63946# Check whether --with-memory-size was given.
63947if test "${with_memory_size+set}" = set; then :
63948  withval=$with_memory_size;
63949fi
63950
63951  if test "x$with_memory_size" = x; then
63952    # The memory size was not specified, try to probe it.
63953
63954  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
63955$as_echo_n "checking for memory size... " >&6; }
63956  # Default to 1024 MB
63957  MEMORY_SIZE=1024
63958  FOUND_MEM=no
63959
63960  if test -f /proc/meminfo; then
63961    # Looks like a Linux (or cygwin) system
63962    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
63963    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
63964    FOUND_MEM=yes
63965  elif test -x /usr/sbin/prtconf; then
63966    # Looks like a Solaris or AIX system
63967    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
63968    FOUND_MEM=yes
63969  elif test -x /usr/sbin/sysctl; then
63970    # Looks like a MacOSX system
63971    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
63972    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
63973    FOUND_MEM=yes
63974  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
63975    # Windows, but without cygwin
63976    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
63977    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
63978    FOUND_MEM=yes
63979  fi
63980
63981  if test "x$FOUND_MEM" = xyes; then
63982    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
63983$as_echo "$MEMORY_SIZE MB" >&6; }
63984  else
63985    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
63986$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
63987    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
63988$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
63989  fi
63990
63991  else
63992    MEMORY_SIZE=$with_memory_size
63993  fi
63994
63995
63996
63997  # Provide a decent default number of parallel jobs for make depending on
63998  # number of cores, amount of memory and machine architecture.
63999
64000# Check whether --with-jobs was given.
64001if test "${with_jobs+set}" = set; then :
64002  withval=$with_jobs;
64003fi
64004
64005  if test "x$with_jobs" = x; then
64006    # Number of jobs was not specified, calculate.
64007    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64008$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64009    # Approximate memory in GB.
64010    memory_gb=`expr $MEMORY_SIZE / 1024`
64011    # Pick the lowest of memory in gb and number of cores.
64012    if test "$memory_gb" -lt "$NUM_CORES"; then
64013      JOBS="$memory_gb"
64014    else
64015      JOBS="$NUM_CORES"
64016    fi
64017    if test "$JOBS" -eq "0"; then
64018      JOBS=1
64019    fi
64020    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64021$as_echo "$JOBS" >&6; }
64022  else
64023    JOBS=$with_jobs
64024  fi
64025
64026
64027
64028  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64029
64030# Check whether --with-test-jobs was given.
64031if test "${with_test_jobs+set}" = set; then :
64032  withval=$with_test_jobs;
64033fi
64034
64035  if test "x$with_test_jobs" = x; then
64036      TEST_JOBS=0
64037  else
64038      TEST_JOBS=$with_test_jobs
64039  fi
64040
64041
64042
64043# Setup arguments for the boot jdk (after cores and memory have been setup)
64044
64045  ##############################################################################
64046  #
64047  # Specify jvm options for anything that is run with the Boot JDK.
64048  # Not all JVM:s accept the same arguments on the command line.
64049  #
64050
64051# Check whether --with-boot-jdk-jvmargs was given.
64052if test "${with_boot_jdk_jvmargs+set}" = set; then :
64053  withval=$with_boot_jdk_jvmargs;
64054fi
64055
64056
64057  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64058$as_echo_n "checking flags for boot jdk java command ... " >&6; }
64059
64060  # Disable special log output when a debug build is used as Boot JDK...
64061
64062  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64063  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64064  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64065  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64066  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64067  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64068    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64069    JVM_ARG_OK=true
64070  else
64071    $ECHO "Arg failed:" >&5
64072    $ECHO "$OUTPUT" >&5
64073    JVM_ARG_OK=false
64074  fi
64075
64076
64077  # Force en-US environment
64078
64079  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
64080  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
64081  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
64082  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64083  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64084  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64085    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
64086    JVM_ARG_OK=true
64087  else
64088    $ECHO "Arg failed:" >&5
64089    $ECHO "$OUTPUT" >&5
64090    JVM_ARG_OK=false
64091  fi
64092
64093
64094  # Apply user provided options.
64095
64096  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64097  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64098  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64099  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64100  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64101  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64102    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64103    JVM_ARG_OK=true
64104  else
64105    $ECHO "Arg failed:" >&5
64106    $ECHO "$OUTPUT" >&5
64107    JVM_ARG_OK=false
64108  fi
64109
64110
64111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64112$as_echo "$boot_jdk_jvmargs" >&6; }
64113
64114  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64115  JAVA_FLAGS=$boot_jdk_jvmargs
64116
64117
64118
64119  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64120$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64121
64122  # Starting amount of heap memory.
64123
64124  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64125  $ECHO "Command: $JAVA -Xms64M -version" >&5
64126  OUTPUT=`$JAVA -Xms64M -version 2>&1`
64127  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64128  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64129  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64130    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64131    JVM_ARG_OK=true
64132  else
64133    $ECHO "Arg failed:" >&5
64134    $ECHO "$OUTPUT" >&5
64135    JVM_ARG_OK=false
64136  fi
64137
64138  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
64139
64140  # Maximum amount of heap memory and stack size.
64141  JVM_HEAP_LIMIT_32="1024"
64142  # Running a 64 bit JVM allows for and requires a bigger heap
64143  JVM_HEAP_LIMIT_64="1600"
64144  STACK_SIZE_32=768
64145  STACK_SIZE_64=1536
64146  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
64147  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
64148    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
64149  fi
64150  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
64151    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
64152  fi
64153  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
64154    JVM_HEAP_LIMIT_32=512
64155    JVM_HEAP_LIMIT_64=512
64156  fi
64157
64158  if test "x$BOOT_JDK_BITS" = "x32"; then
64159    STACK_SIZE=$STACK_SIZE_32
64160    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
64161  else
64162    STACK_SIZE=$STACK_SIZE_64
64163    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
64164  fi
64165
64166  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64167  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64168  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
64169  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64170  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64171  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64172    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
64173    JVM_ARG_OK=true
64174  else
64175    $ECHO "Arg failed:" >&5
64176    $ECHO "$OUTPUT" >&5
64177    JVM_ARG_OK=false
64178  fi
64179
64180
64181  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
64182  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
64183  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
64184  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64185  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64186  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64187    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
64188    JVM_ARG_OK=true
64189  else
64190    $ECHO "Arg failed:" >&5
64191    $ECHO "$OUTPUT" >&5
64192    JVM_ARG_OK=false
64193  fi
64194
64195
64196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
64197$as_echo "$boot_jdk_jvmargs_big" >&6; }
64198
64199  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
64200
64201
64202  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
64203    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
64204    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
64205  else
64206    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
64207    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
64208  fi
64209  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
64210  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
64211  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
64212$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
64213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
64214$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
64215
64216
64217  # By default, the main javac compilations use big
64218  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
64219
64220
64221  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
64222$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
64223
64224  # Use serial gc for small short lived tools if possible
64225
64226  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
64227  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
64228  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
64229  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64230  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64231  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64232    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
64233    JVM_ARG_OK=true
64234  else
64235    $ECHO "Arg failed:" >&5
64236    $ECHO "$OUTPUT" >&5
64237    JVM_ARG_OK=false
64238  fi
64239
64240
64241  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
64242  $ECHO "Command: $JAVA -Xms32M -version" >&5
64243  OUTPUT=`$JAVA -Xms32M -version 2>&1`
64244  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64245  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64246  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64247    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
64248    JVM_ARG_OK=true
64249  else
64250    $ECHO "Arg failed:" >&5
64251    $ECHO "$OUTPUT" >&5
64252    JVM_ARG_OK=false
64253  fi
64254
64255
64256  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
64257  $ECHO "Command: $JAVA -Xmx512M -version" >&5
64258  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
64259  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64260  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64261  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64262    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
64263    JVM_ARG_OK=true
64264  else
64265    $ECHO "Arg failed:" >&5
64266    $ECHO "$OUTPUT" >&5
64267    JVM_ARG_OK=false
64268  fi
64269
64270
64271  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
64272  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
64273  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
64274  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64275  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64276  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64277    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
64278    JVM_ARG_OK=true
64279  else
64280    $ECHO "Arg failed:" >&5
64281    $ECHO "$OUTPUT" >&5
64282    JVM_ARG_OK=false
64283  fi
64284
64285
64286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
64287$as_echo "$boot_jdk_jvmargs_small" >&6; }
64288
64289  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
64290
64291
64292  JAVA_TOOL_FLAGS_SMALL=""
64293  for f in $JAVA_FLAGS_SMALL; do
64294    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
64295  done
64296
64297
64298
64299# Setup smart javac (after cores and memory have been setup)
64300
64301
64302# Check whether --with-sjavac-server-java was given.
64303if test "${with_sjavac_server_java+set}" = set; then :
64304  withval=$with_sjavac_server_java;
64305fi
64306
64307
64308  if test "x$with_sjavac_server_java" != x; then
64309    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
64310    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
64311    if test "x$FOUND_VERSION" = x; then
64312      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
64313    fi
64314  else
64315    SJAVAC_SERVER_JAVA="$JAVA"
64316  fi
64317
64318
64319  if test "$MEMORY_SIZE" -gt "3000"; then
64320
64321  $ECHO "Check if jvm arg is ok: -d64" >&5
64322  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
64323  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
64324  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64325  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64326  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64327    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
64328    JVM_ARG_OK=true
64329  else
64330    $ECHO "Arg failed:" >&5
64331    $ECHO "$OUTPUT" >&5
64332    JVM_ARG_OK=false
64333  fi
64334
64335    if test "$JVM_ARG_OK" = true; then
64336      JVM_64BIT=true
64337      JVM_ARG_OK=false
64338    fi
64339  fi
64340
64341  MX_VALUE=`expr $MEMORY_SIZE / 2`
64342  if test "$JVM_64BIT" = true; then
64343    # Set ms lower than mx since more than one instance of the server might
64344    # get launched at the same time before they figure out which instance won.
64345    MS_VALUE=512
64346    if test "$MX_VALUE" -gt "2048"; then
64347      MX_VALUE=2048
64348    fi
64349  else
64350    MS_VALUE=256
64351    if test "$MX_VALUE" -gt "1500"; then
64352      MX_VALUE=1500
64353    fi
64354  fi
64355  if test "$MX_VALUE" -lt "512"; then
64356    MX_VALUE=512
64357  fi
64358
64359  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
64360  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
64361  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
64362  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64363  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64364  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64365    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
64366    JVM_ARG_OK=true
64367  else
64368    $ECHO "Arg failed:" >&5
64369    $ECHO "$OUTPUT" >&5
64370    JVM_ARG_OK=false
64371  fi
64372
64373
64374
64375  # Check whether --enable-sjavac was given.
64376if test "${enable_sjavac+set}" = set; then :
64377  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
64378else
64379  ENABLE_SJAVAC="no"
64380fi
64381
64382  if test "x$JVM_ARG_OK" = "xfalse"; then
64383    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
64384$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
64385    ENABLE_SJAVAC="no"
64386  fi
64387  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
64388$as_echo_n "checking whether to use sjavac... " >&6; }
64389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
64390$as_echo "$ENABLE_SJAVAC" >&6; }
64391
64392
64393  # Check whether --enable-javac-server was given.
64394if test "${enable_javac_server+set}" = set; then :
64395  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
64396else
64397  ENABLE_JAVAC_SERVER="yes"
64398fi
64399
64400  if test "x$JVM_ARG_OK" = "xfalse"; then
64401    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
64402$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
64403    ENABLE_JAVAC_SERVER="no"
64404  fi
64405  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
64406$as_echo_n "checking whether to use javac server... " >&6; }
64407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
64408$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
64409
64410
64411  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
64412    # When using a server javac, the small client instances do not need much
64413    # resources.
64414    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
64415  fi
64416
64417
64418# Setup use of icecc if requested
64419
64420  # Check whether --enable-icecc was given.
64421if test "${enable_icecc+set}" = set; then :
64422  enableval=$enable_icecc;
64423fi
64424
64425
64426  if test "x${enable_icecc}" = "xyes"; then
64427
64428
64429
64430  # Publish this variable in the help.
64431
64432
64433  if [ -z "${ICECC_CMD+x}" ]; then
64434    # The variable is not set by user, try to locate tool using the code snippet
64435    for ac_prog in icecc
64436do
64437  # Extract the first word of "$ac_prog", so it can be a program name with args.
64438set dummy $ac_prog; ac_word=$2
64439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64440$as_echo_n "checking for $ac_word... " >&6; }
64441if ${ac_cv_path_ICECC_CMD+:} false; then :
64442  $as_echo_n "(cached) " >&6
64443else
64444  case $ICECC_CMD in
64445  [\\/]* | ?:[\\/]*)
64446  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64447  ;;
64448  *)
64449  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64450for as_dir in $PATH
64451do
64452  IFS=$as_save_IFS
64453  test -z "$as_dir" && as_dir=.
64454    for ac_exec_ext in '' $ac_executable_extensions; do
64455  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64456    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64457    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64458    break 2
64459  fi
64460done
64461  done
64462IFS=$as_save_IFS
64463
64464  ;;
64465esac
64466fi
64467ICECC_CMD=$ac_cv_path_ICECC_CMD
64468if test -n "$ICECC_CMD"; then
64469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64470$as_echo "$ICECC_CMD" >&6; }
64471else
64472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64473$as_echo "no" >&6; }
64474fi
64475
64476
64477  test -n "$ICECC_CMD" && break
64478done
64479
64480  else
64481    # The variable is set, but is it from the command line or the environment?
64482
64483    # Try to remove the string !ICECC_CMD! from our list.
64484    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
64485    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64486      # If it failed, the variable was not from the command line. Ignore it,
64487      # but warn the user (except for BASH, which is always set by the calling BASH).
64488      if test "xICECC_CMD" != xBASH; then
64489        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
64490$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
64491      fi
64492      # Try to locate tool using the code snippet
64493      for ac_prog in icecc
64494do
64495  # Extract the first word of "$ac_prog", so it can be a program name with args.
64496set dummy $ac_prog; ac_word=$2
64497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64498$as_echo_n "checking for $ac_word... " >&6; }
64499if ${ac_cv_path_ICECC_CMD+:} false; then :
64500  $as_echo_n "(cached) " >&6
64501else
64502  case $ICECC_CMD in
64503  [\\/]* | ?:[\\/]*)
64504  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64505  ;;
64506  *)
64507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64508for as_dir in $PATH
64509do
64510  IFS=$as_save_IFS
64511  test -z "$as_dir" && as_dir=.
64512    for ac_exec_ext in '' $ac_executable_extensions; do
64513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64514    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64516    break 2
64517  fi
64518done
64519  done
64520IFS=$as_save_IFS
64521
64522  ;;
64523esac
64524fi
64525ICECC_CMD=$ac_cv_path_ICECC_CMD
64526if test -n "$ICECC_CMD"; then
64527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64528$as_echo "$ICECC_CMD" >&6; }
64529else
64530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64531$as_echo "no" >&6; }
64532fi
64533
64534
64535  test -n "$ICECC_CMD" && break
64536done
64537
64538    else
64539      # If it succeeded, then it was overridden by the user. We will use it
64540      # for the tool.
64541
64542      # First remove it from the list of overridden variables, so we can test
64543      # for unknown variables in the end.
64544      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64545
64546      # Check if we try to supply an empty value
64547      if test "x$ICECC_CMD" = x; then
64548        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
64549$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
64550        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64551$as_echo_n "checking for ICECC_CMD... " >&6; }
64552        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64553$as_echo "disabled" >&6; }
64554      else
64555        # Check if the provided tool contains a complete path.
64556        tool_specified="$ICECC_CMD"
64557        tool_basename="${tool_specified##*/}"
64558        if test "x$tool_basename" = "x$tool_specified"; then
64559          # A command without a complete path is provided, search $PATH.
64560          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
64561$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
64562          # Extract the first word of "$tool_basename", so it can be a program name with args.
64563set dummy $tool_basename; ac_word=$2
64564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64565$as_echo_n "checking for $ac_word... " >&6; }
64566if ${ac_cv_path_ICECC_CMD+:} false; then :
64567  $as_echo_n "(cached) " >&6
64568else
64569  case $ICECC_CMD in
64570  [\\/]* | ?:[\\/]*)
64571  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64572  ;;
64573  *)
64574  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64575for as_dir in $PATH
64576do
64577  IFS=$as_save_IFS
64578  test -z "$as_dir" && as_dir=.
64579    for ac_exec_ext in '' $ac_executable_extensions; do
64580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64581    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64583    break 2
64584  fi
64585done
64586  done
64587IFS=$as_save_IFS
64588
64589  ;;
64590esac
64591fi
64592ICECC_CMD=$ac_cv_path_ICECC_CMD
64593if test -n "$ICECC_CMD"; then
64594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64595$as_echo "$ICECC_CMD" >&6; }
64596else
64597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64598$as_echo "no" >&6; }
64599fi
64600
64601
64602          if test "x$ICECC_CMD" = x; then
64603            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64604          fi
64605        else
64606          # Otherwise we believe it is a complete path. Use it as it is.
64607          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
64608$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
64609          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64610$as_echo_n "checking for ICECC_CMD... " >&6; }
64611          if test ! -x "$tool_specified"; then
64612            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64613$as_echo "not found" >&6; }
64614            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
64615          fi
64616          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64617$as_echo "$tool_specified" >&6; }
64618        fi
64619      fi
64620    fi
64621
64622  fi
64623
64624
64625
64626  if test "x$ICECC_CMD" = x; then
64627    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
64628  fi
64629
64630
64631    old_path="$PATH"
64632
64633    # Look for icecc-create-env in some known places
64634    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
64635
64636
64637
64638  # Publish this variable in the help.
64639
64640
64641  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
64642    # The variable is not set by user, try to locate tool using the code snippet
64643    for ac_prog in icecc-create-env
64644do
64645  # Extract the first word of "$ac_prog", so it can be a program name with args.
64646set dummy $ac_prog; ac_word=$2
64647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64648$as_echo_n "checking for $ac_word... " >&6; }
64649if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64650  $as_echo_n "(cached) " >&6
64651else
64652  case $ICECC_CREATE_ENV in
64653  [\\/]* | ?:[\\/]*)
64654  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64655  ;;
64656  *)
64657  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64658for as_dir in $PATH
64659do
64660  IFS=$as_save_IFS
64661  test -z "$as_dir" && as_dir=.
64662    for ac_exec_ext in '' $ac_executable_extensions; do
64663  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64664    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64666    break 2
64667  fi
64668done
64669  done
64670IFS=$as_save_IFS
64671
64672  ;;
64673esac
64674fi
64675ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64676if test -n "$ICECC_CREATE_ENV"; then
64677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64678$as_echo "$ICECC_CREATE_ENV" >&6; }
64679else
64680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64681$as_echo "no" >&6; }
64682fi
64683
64684
64685  test -n "$ICECC_CREATE_ENV" && break
64686done
64687
64688  else
64689    # The variable is set, but is it from the command line or the environment?
64690
64691    # Try to remove the string !ICECC_CREATE_ENV! from our list.
64692    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
64693    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64694      # If it failed, the variable was not from the command line. Ignore it,
64695      # but warn the user (except for BASH, which is always set by the calling BASH).
64696      if test "xICECC_CREATE_ENV" != xBASH; then
64697        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
64698$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
64699      fi
64700      # Try to locate tool using the code snippet
64701      for ac_prog in icecc-create-env
64702do
64703  # Extract the first word of "$ac_prog", so it can be a program name with args.
64704set dummy $ac_prog; ac_word=$2
64705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64706$as_echo_n "checking for $ac_word... " >&6; }
64707if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64708  $as_echo_n "(cached) " >&6
64709else
64710  case $ICECC_CREATE_ENV in
64711  [\\/]* | ?:[\\/]*)
64712  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64713  ;;
64714  *)
64715  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64716for as_dir in $PATH
64717do
64718  IFS=$as_save_IFS
64719  test -z "$as_dir" && as_dir=.
64720    for ac_exec_ext in '' $ac_executable_extensions; do
64721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64722    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64724    break 2
64725  fi
64726done
64727  done
64728IFS=$as_save_IFS
64729
64730  ;;
64731esac
64732fi
64733ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64734if test -n "$ICECC_CREATE_ENV"; then
64735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64736$as_echo "$ICECC_CREATE_ENV" >&6; }
64737else
64738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64739$as_echo "no" >&6; }
64740fi
64741
64742
64743  test -n "$ICECC_CREATE_ENV" && break
64744done
64745
64746    else
64747      # If it succeeded, then it was overridden by the user. We will use it
64748      # for the tool.
64749
64750      # First remove it from the list of overridden variables, so we can test
64751      # for unknown variables in the end.
64752      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64753
64754      # Check if we try to supply an empty value
64755      if test "x$ICECC_CREATE_ENV" = x; then
64756        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
64757$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
64758        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64759$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64760        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64761$as_echo "disabled" >&6; }
64762      else
64763        # Check if the provided tool contains a complete path.
64764        tool_specified="$ICECC_CREATE_ENV"
64765        tool_basename="${tool_specified##*/}"
64766        if test "x$tool_basename" = "x$tool_specified"; then
64767          # A command without a complete path is provided, search $PATH.
64768          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
64769$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
64770          # Extract the first word of "$tool_basename", so it can be a program name with args.
64771set dummy $tool_basename; ac_word=$2
64772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64773$as_echo_n "checking for $ac_word... " >&6; }
64774if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64775  $as_echo_n "(cached) " >&6
64776else
64777  case $ICECC_CREATE_ENV in
64778  [\\/]* | ?:[\\/]*)
64779  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64780  ;;
64781  *)
64782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64783for as_dir in $PATH
64784do
64785  IFS=$as_save_IFS
64786  test -z "$as_dir" && as_dir=.
64787    for ac_exec_ext in '' $ac_executable_extensions; do
64788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64789    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64791    break 2
64792  fi
64793done
64794  done
64795IFS=$as_save_IFS
64796
64797  ;;
64798esac
64799fi
64800ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64801if test -n "$ICECC_CREATE_ENV"; then
64802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64803$as_echo "$ICECC_CREATE_ENV" >&6; }
64804else
64805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64806$as_echo "no" >&6; }
64807fi
64808
64809
64810          if test "x$ICECC_CREATE_ENV" = x; then
64811            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64812          fi
64813        else
64814          # Otherwise we believe it is a complete path. Use it as it is.
64815          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
64816$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
64817          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64818$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64819          if test ! -x "$tool_specified"; then
64820            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64821$as_echo "not found" >&6; }
64822            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
64823          fi
64824          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64825$as_echo "$tool_specified" >&6; }
64826        fi
64827      fi
64828    fi
64829
64830  fi
64831
64832
64833
64834  if test "x$ICECC_CREATE_ENV" = x; then
64835    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
64836  fi
64837
64838
64839    # Use icecc-create-env to create a minimal compilation environment that can
64840    # be sent to the other hosts in the icecream cluster.
64841    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
64842    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
64843    # Older versions of icecc does not have the --gcc parameter
64844    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
64845      icecc_gcc_arg="--gcc"
64846    fi
64847    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
64848
64849  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
64850      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
64851          ${icecc_create_env_log} 2>&1 )
64852  if test "$?" != "0"; then
64853    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
64854$as_echo "$as_me: icecc-create-env output:" >&6;}
64855    cat \
64856          ${icecc_create_env_log}
64857    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
64858  fi
64859
64860    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
64861      # For clang, the icecc compilerwrapper is needed. It usually resides next
64862      # to icecc-create-env.
64863
64864
64865
64866  # Publish this variable in the help.
64867
64868
64869  if [ -z "${ICECC_WRAPPER+x}" ]; then
64870    # The variable is not set by user, try to locate tool using the code snippet
64871    for ac_prog in compilerwrapper
64872do
64873  # Extract the first word of "$ac_prog", so it can be a program name with args.
64874set dummy $ac_prog; ac_word=$2
64875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64876$as_echo_n "checking for $ac_word... " >&6; }
64877if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64878  $as_echo_n "(cached) " >&6
64879else
64880  case $ICECC_WRAPPER in
64881  [\\/]* | ?:[\\/]*)
64882  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64883  ;;
64884  *)
64885  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64886for as_dir in $PATH
64887do
64888  IFS=$as_save_IFS
64889  test -z "$as_dir" && as_dir=.
64890    for ac_exec_ext in '' $ac_executable_extensions; do
64891  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64892    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64894    break 2
64895  fi
64896done
64897  done
64898IFS=$as_save_IFS
64899
64900  ;;
64901esac
64902fi
64903ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64904if test -n "$ICECC_WRAPPER"; then
64905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64906$as_echo "$ICECC_WRAPPER" >&6; }
64907else
64908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64909$as_echo "no" >&6; }
64910fi
64911
64912
64913  test -n "$ICECC_WRAPPER" && break
64914done
64915
64916  else
64917    # The variable is set, but is it from the command line or the environment?
64918
64919    # Try to remove the string !ICECC_WRAPPER! from our list.
64920    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
64921    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64922      # If it failed, the variable was not from the command line. Ignore it,
64923      # but warn the user (except for BASH, which is always set by the calling BASH).
64924      if test "xICECC_WRAPPER" != xBASH; then
64925        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
64926$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
64927      fi
64928      # Try to locate tool using the code snippet
64929      for ac_prog in compilerwrapper
64930do
64931  # Extract the first word of "$ac_prog", so it can be a program name with args.
64932set dummy $ac_prog; ac_word=$2
64933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64934$as_echo_n "checking for $ac_word... " >&6; }
64935if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64936  $as_echo_n "(cached) " >&6
64937else
64938  case $ICECC_WRAPPER in
64939  [\\/]* | ?:[\\/]*)
64940  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64941  ;;
64942  *)
64943  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64944for as_dir in $PATH
64945do
64946  IFS=$as_save_IFS
64947  test -z "$as_dir" && as_dir=.
64948    for ac_exec_ext in '' $ac_executable_extensions; do
64949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64950    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64952    break 2
64953  fi
64954done
64955  done
64956IFS=$as_save_IFS
64957
64958  ;;
64959esac
64960fi
64961ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64962if test -n "$ICECC_WRAPPER"; then
64963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64964$as_echo "$ICECC_WRAPPER" >&6; }
64965else
64966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64967$as_echo "no" >&6; }
64968fi
64969
64970
64971  test -n "$ICECC_WRAPPER" && break
64972done
64973
64974    else
64975      # If it succeeded, then it was overridden by the user. We will use it
64976      # for the tool.
64977
64978      # First remove it from the list of overridden variables, so we can test
64979      # for unknown variables in the end.
64980      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64981
64982      # Check if we try to supply an empty value
64983      if test "x$ICECC_WRAPPER" = x; then
64984        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
64985$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
64986        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
64987$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
64988        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64989$as_echo "disabled" >&6; }
64990      else
64991        # Check if the provided tool contains a complete path.
64992        tool_specified="$ICECC_WRAPPER"
64993        tool_basename="${tool_specified##*/}"
64994        if test "x$tool_basename" = "x$tool_specified"; then
64995          # A command without a complete path is provided, search $PATH.
64996          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
64997$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
64998          # Extract the first word of "$tool_basename", so it can be a program name with args.
64999set dummy $tool_basename; ac_word=$2
65000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65001$as_echo_n "checking for $ac_word... " >&6; }
65002if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65003  $as_echo_n "(cached) " >&6
65004else
65005  case $ICECC_WRAPPER in
65006  [\\/]* | ?:[\\/]*)
65007  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65008  ;;
65009  *)
65010  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65011for as_dir in $PATH
65012do
65013  IFS=$as_save_IFS
65014  test -z "$as_dir" && as_dir=.
65015    for ac_exec_ext in '' $ac_executable_extensions; do
65016  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65017    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65018    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65019    break 2
65020  fi
65021done
65022  done
65023IFS=$as_save_IFS
65024
65025  ;;
65026esac
65027fi
65028ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65029if test -n "$ICECC_WRAPPER"; then
65030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65031$as_echo "$ICECC_WRAPPER" >&6; }
65032else
65033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65034$as_echo "no" >&6; }
65035fi
65036
65037
65038          if test "x$ICECC_WRAPPER" = x; then
65039            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65040          fi
65041        else
65042          # Otherwise we believe it is a complete path. Use it as it is.
65043          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
65044$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
65045          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65046$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65047          if test ! -x "$tool_specified"; then
65048            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65049$as_echo "not found" >&6; }
65050            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
65051          fi
65052          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65053$as_echo "$tool_specified" >&6; }
65054        fi
65055      fi
65056    fi
65057
65058  fi
65059
65060
65061
65062  if test "x$ICECC_WRAPPER" = x; then
65063    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65064  fi
65065
65066
65067
65068  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65069      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65070  if test "$?" != "0"; then
65071    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65072$as_echo "$as_me: icecc-create-env output:" >&6;}
65073    cat ${icecc_create_env_log}
65074    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65075  fi
65076
65077    else
65078      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65079    fi
65080    PATH="$old_path"
65081    # The bundle with the compiler gets a name based on checksums. Parse log file
65082    # to find it.
65083    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65084    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65085    if test ! -f ${ICECC_ENV_BUNDLE}; then
65086      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65087    fi
65088    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65089$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65090    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65091$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65092    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65093
65094    if test "x${COMPILE_TYPE}" = "xcross"; then
65095      # If cross compiling, create a separate env package for the build compiler
65096      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65097      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65098      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
65099
65100  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65101      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65102            ${icecc_create_env_log_build} 2>&1 )
65103  if test "$?" != "0"; then
65104    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65105$as_echo "$as_me: icecc-create-env output:" >&6;}
65106    cat \
65107            ${icecc_create_env_log_build}
65108    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65109  fi
65110
65111      elif test "x${BUILD_CC##*/}" = "xclang"; then
65112
65113  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65114      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65115  if test "$?" != "0"; then
65116    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65117$as_echo "$as_me: icecc-create-env output:" >&6;}
65118    cat ${icecc_create_env_log_build}
65119    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65120  fi
65121
65122      else
65123        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65124      fi
65125      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65126      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65127      if test ! -f ${ICECC_ENV_BUNDLE}; then
65128        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65129      fi
65130      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65131$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65132      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65133$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65134      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65135          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65136    else
65137      BUILD_ICECC="${ICECC}"
65138    fi
65139
65140
65141  fi
65142
65143
65144# Can the C/C++ compiler use precompiled headers?
65145
65146
65147  ###############################################################################
65148  #
65149  # Can the C/C++ compiler use precompiled headers?
65150  #
65151  # Check whether --enable-precompiled-headers was given.
65152if test "${enable_precompiled_headers+set}" = set; then :
65153  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65154else
65155  ENABLE_PRECOMPH=yes
65156fi
65157
65158
65159  USE_PRECOMPILED_HEADER=1
65160  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
65161$as_echo_n "checking If precompiled header is enabled... " >&6; }
65162  if test "x$ENABLE_PRECOMPH" = xno; then
65163    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65164$as_echo "no, forced" >&6; }
65165    USE_PRECOMPILED_HEADER=0
65166  elif test "x$ICECC" != "x"; then
65167    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65168$as_echo "no, does not work effectively with icecc" >&6; }
65169    USE_PRECOMPILED_HEADER=0
65170  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65171    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65172$as_echo "no, does not work with Solaris Studio" >&6; }
65173    USE_PRECOMPILED_HEADER=0
65174  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
65175    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
65176$as_echo "no, does not work with xlc" >&6; }
65177    USE_PRECOMPILED_HEADER=0
65178  else
65179    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65180$as_echo "yes" >&6; }
65181  fi
65182
65183  if test "x$ENABLE_PRECOMPH" = xyes; then
65184    # Check that the compiler actually supports precomp headers.
65185    if test "x$TOOLCHAIN_TYPE" = xgcc; then
65186      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
65187$as_echo_n "checking that precompiled headers work... " >&6; }
65188      echo "int alfa();" > conftest.h
65189      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
65190      if test ! -f conftest.hpp.gch; then
65191        USE_PRECOMPILED_HEADER=0
65192        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65193$as_echo "no" >&6; }
65194      else
65195        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65196$as_echo "yes" >&6; }
65197      fi
65198      $RM conftest.h conftest.hpp.gch
65199    fi
65200  fi
65201
65202
65203
65204
65205# Setup use of ccache, if available
65206
65207  # Check whether --enable-ccache was given.
65208if test "${enable_ccache+set}" = set; then :
65209  enableval=$enable_ccache;
65210fi
65211
65212
65213  CCACHE_STATUS=
65214  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
65215$as_echo_n "checking is ccache enabled... " >&6; }
65216  if test "x$enable_ccache" = xyes; then
65217    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
65218      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65219$as_echo "yes" >&6; }
65220      OLD_PATH="$PATH"
65221      if test "x$TOOLCHAIN_PATH" != x; then
65222        PATH=$TOOLCHAIN_PATH:$PATH
65223      fi
65224
65225
65226
65227  # Publish this variable in the help.
65228
65229
65230  if [ -z "${CCACHE+x}" ]; then
65231    # The variable is not set by user, try to locate tool using the code snippet
65232    for ac_prog in ccache
65233do
65234  # Extract the first word of "$ac_prog", so it can be a program name with args.
65235set dummy $ac_prog; ac_word=$2
65236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65237$as_echo_n "checking for $ac_word... " >&6; }
65238if ${ac_cv_path_CCACHE+:} false; then :
65239  $as_echo_n "(cached) " >&6
65240else
65241  case $CCACHE in
65242  [\\/]* | ?:[\\/]*)
65243  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65244  ;;
65245  *)
65246  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65247for as_dir in $PATH
65248do
65249  IFS=$as_save_IFS
65250  test -z "$as_dir" && as_dir=.
65251    for ac_exec_ext in '' $ac_executable_extensions; do
65252  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65253    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65254    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65255    break 2
65256  fi
65257done
65258  done
65259IFS=$as_save_IFS
65260
65261  ;;
65262esac
65263fi
65264CCACHE=$ac_cv_path_CCACHE
65265if test -n "$CCACHE"; then
65266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65267$as_echo "$CCACHE" >&6; }
65268else
65269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65270$as_echo "no" >&6; }
65271fi
65272
65273
65274  test -n "$CCACHE" && break
65275done
65276
65277  else
65278    # The variable is set, but is it from the command line or the environment?
65279
65280    # Try to remove the string !CCACHE! from our list.
65281    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
65282    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65283      # If it failed, the variable was not from the command line. Ignore it,
65284      # but warn the user (except for BASH, which is always set by the calling BASH).
65285      if test "xCCACHE" != xBASH; then
65286        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
65287$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
65288      fi
65289      # Try to locate tool using the code snippet
65290      for ac_prog in ccache
65291do
65292  # Extract the first word of "$ac_prog", so it can be a program name with args.
65293set dummy $ac_prog; ac_word=$2
65294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65295$as_echo_n "checking for $ac_word... " >&6; }
65296if ${ac_cv_path_CCACHE+:} false; then :
65297  $as_echo_n "(cached) " >&6
65298else
65299  case $CCACHE in
65300  [\\/]* | ?:[\\/]*)
65301  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65302  ;;
65303  *)
65304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65305for as_dir in $PATH
65306do
65307  IFS=$as_save_IFS
65308  test -z "$as_dir" && as_dir=.
65309    for ac_exec_ext in '' $ac_executable_extensions; do
65310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65311    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65313    break 2
65314  fi
65315done
65316  done
65317IFS=$as_save_IFS
65318
65319  ;;
65320esac
65321fi
65322CCACHE=$ac_cv_path_CCACHE
65323if test -n "$CCACHE"; then
65324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65325$as_echo "$CCACHE" >&6; }
65326else
65327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65328$as_echo "no" >&6; }
65329fi
65330
65331
65332  test -n "$CCACHE" && break
65333done
65334
65335    else
65336      # If it succeeded, then it was overridden by the user. We will use it
65337      # for the tool.
65338
65339      # First remove it from the list of overridden variables, so we can test
65340      # for unknown variables in the end.
65341      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65342
65343      # Check if we try to supply an empty value
65344      if test "x$CCACHE" = x; then
65345        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
65346$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
65347        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65348$as_echo_n "checking for CCACHE... " >&6; }
65349        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65350$as_echo "disabled" >&6; }
65351      else
65352        # Check if the provided tool contains a complete path.
65353        tool_specified="$CCACHE"
65354        tool_basename="${tool_specified##*/}"
65355        if test "x$tool_basename" = "x$tool_specified"; then
65356          # A command without a complete path is provided, search $PATH.
65357          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
65358$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
65359          # Extract the first word of "$tool_basename", so it can be a program name with args.
65360set dummy $tool_basename; ac_word=$2
65361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65362$as_echo_n "checking for $ac_word... " >&6; }
65363if ${ac_cv_path_CCACHE+:} false; then :
65364  $as_echo_n "(cached) " >&6
65365else
65366  case $CCACHE in
65367  [\\/]* | ?:[\\/]*)
65368  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65369  ;;
65370  *)
65371  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65372for as_dir in $PATH
65373do
65374  IFS=$as_save_IFS
65375  test -z "$as_dir" && as_dir=.
65376    for ac_exec_ext in '' $ac_executable_extensions; do
65377  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65378    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65379    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65380    break 2
65381  fi
65382done
65383  done
65384IFS=$as_save_IFS
65385
65386  ;;
65387esac
65388fi
65389CCACHE=$ac_cv_path_CCACHE
65390if test -n "$CCACHE"; then
65391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65392$as_echo "$CCACHE" >&6; }
65393else
65394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65395$as_echo "no" >&6; }
65396fi
65397
65398
65399          if test "x$CCACHE" = x; then
65400            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65401          fi
65402        else
65403          # Otherwise we believe it is a complete path. Use it as it is.
65404          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
65405$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
65406          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65407$as_echo_n "checking for CCACHE... " >&6; }
65408          if test ! -x "$tool_specified"; then
65409            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65410$as_echo "not found" >&6; }
65411            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
65412          fi
65413          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65414$as_echo "$tool_specified" >&6; }
65415        fi
65416      fi
65417    fi
65418
65419  fi
65420
65421
65422
65423  if test "x$CCACHE" = x; then
65424    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
65425  fi
65426
65427
65428      PATH="$OLD_PATH"
65429      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
65430      CCACHE_STATUS="Active ($CCACHE_VERSION)"
65431    else
65432      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65433$as_echo "no" >&6; }
65434      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
65435$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
65436    fi
65437  elif test "x$enable_ccache" = xno; then
65438    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
65439$as_echo "no, explicitly disabled" >&6; }
65440    CCACHE_STATUS="Disabled"
65441  elif test "x$enable_ccache" = x; then
65442    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65443$as_echo "no" >&6; }
65444  else
65445    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
65446$as_echo "unknown" >&6; }
65447    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
65448  fi
65449
65450
65451
65452# Check whether --with-ccache-dir was given.
65453if test "${with_ccache_dir+set}" = set; then :
65454  withval=$with_ccache_dir;
65455fi
65456
65457
65458  if test "x$with_ccache_dir" != x; then
65459    # When using a non home ccache directory, assume the use is to share ccache files
65460    # with other users. Thus change the umask.
65461    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
65462    if test "x$CCACHE" = x; then
65463      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
65464$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
65465    fi
65466  fi
65467
65468  if test "x$CCACHE" != x; then
65469
65470  if test "x$CCACHE" != x; then
65471    if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
65472      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
65473          $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
65474      if test "x$HAS_BAD_CCACHE" != "x"; then
65475        as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
65476      fi
65477    fi
65478    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
65479      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
65480          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
65481      if test "x$HAS_BAD_CCACHE" != "x"; then
65482        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
65483      fi
65484      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
65485$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
65486      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
65487      PUSHED_FLAGS="$CXXFLAGS"
65488      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
65489      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65490/* end confdefs.h.  */
65491
65492int
65493main ()
65494{
65495
65496  ;
65497  return 0;
65498}
65499_ACEOF
65500if ac_fn_cxx_try_compile "$LINENO"; then :
65501  CC_KNOWS_CCACHE_TRICK=yes
65502else
65503  CC_KNOWS_CCACHE_TRICK=no
65504fi
65505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
65506      CXXFLAGS="$PUSHED_FLAGS"
65507      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
65508        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65509$as_echo "yes" >&6; }
65510        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
65511
65512        CCACHE_SLOPPINESS=pch_defines,time_macros
65513      else
65514        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65515$as_echo "no" >&6; }
65516        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
65517      fi
65518    fi
65519
65520    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
65521        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
65522
65523    if test "x$SET_CCACHE_DIR" != x; then
65524      mkdir -p $CCACHE_DIR > /dev/null 2>&1
65525      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
65526    fi
65527  fi
65528
65529  fi
65530
65531
65532###############################################################################
65533#
65534# And now the finish...
65535#
65536###############################################################################
65537
65538# Check for some common pitfalls
65539
65540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65541    file_to_test="$SRC_ROOT/LICENSE"
65542    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
65543      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
65544    fi
65545  fi
65546
65547
65548  # Did user specify any unknown variables?
65549
65550  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
65551    # Replace the separating ! with spaces before presenting for end user.
65552    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
65553    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
65554$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
65555  fi
65556
65557
65558  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
65559$as_echo_n "checking if build directory is on local disk... " >&6; }
65560
65561  # df -l lists only local disks; if the given directory is not found then
65562  # a non-zero exit code is given
65563  if test "x$DF" = x; then
65564    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65565      # msys does not have df; use Windows "net use" instead.
65566      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
65567      if test "x$IS_NETWORK_DISK" = x; then
65568        OUTPUT_DIR_IS_LOCAL="yes"
65569      else
65570        OUTPUT_DIR_IS_LOCAL="no"
65571      fi
65572    else
65573      # No df here, say it's local
65574      OUTPUT_DIR_IS_LOCAL="yes"
65575    fi
65576  else
65577    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
65578      OUTPUT_DIR_IS_LOCAL="yes"
65579    else
65580      OUTPUT_DIR_IS_LOCAL="no"
65581    fi
65582  fi
65583
65584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
65585$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
65586
65587
65588
65589  # Check if the user has any old-style ALT_ variables set.
65590  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
65591
65592  # Before generating output files, test if they exist. If they do, this is a reconfigure.
65593  # Since we can't properly handle the dependencies for this, warn the user about the situation
65594  if test -e $OUTPUT_ROOT/spec.gmk; then
65595    IS_RECONFIGURE=yes
65596  else
65597    IS_RECONFIGURE=no
65598  fi
65599
65600
65601# At the end, call the custom hook. (Dummy macro if no custom sources available)
65602
65603
65604# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
65605
65606  # Keep feature lists sorted and free of duplicates
65607  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
65608  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
65609  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
65610  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
65611  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
65612  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
65613  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
65614
65615  # Validate features
65616  for variant in $JVM_VARIANTS; do
65617    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
65618$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
65619    features_var_name=JVM_FEATURES_$variant
65620    JVM_FEATURES_TO_TEST=${!features_var_name}
65621    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
65622$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
65623    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
65624    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
65625    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
65626    if test "x$INVALID_FEATURES" != x; then
65627      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
65628    fi
65629  done
65630
65631
65632# We're messing a bit with internal autoconf variables to put the config.status
65633# in the output directory instead of the current directory.
65634CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
65635
65636# Create the actual output files. Now the main work of configure is done.
65637cat >confcache <<\_ACEOF
65638# This file is a shell script that caches the results of configure
65639# tests run on this system so they can be shared between configure
65640# scripts and configure runs, see configure's option --config-cache.
65641# It is not useful on other systems.  If it contains results you don't
65642# want to keep, you may remove or edit it.
65643#
65644# config.status only pays attention to the cache file if you give it
65645# the --recheck option to rerun configure.
65646#
65647# `ac_cv_env_foo' variables (set or unset) will be overridden when
65648# loading this file, other *unset* `ac_cv_foo' will be assigned the
65649# following values.
65650
65651_ACEOF
65652
65653# The following way of writing the cache mishandles newlines in values,
65654# but we know of no workaround that is simple, portable, and efficient.
65655# So, we kill variables containing newlines.
65656# Ultrix sh set writes to stderr and can't be redirected directly,
65657# and sets the high bit in the cache file unless we assign to the vars.
65658(
65659  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
65660    eval ac_val=\$$ac_var
65661    case $ac_val in #(
65662    *${as_nl}*)
65663      case $ac_var in #(
65664      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
65665$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
65666      esac
65667      case $ac_var in #(
65668      _ | IFS | as_nl) ;; #(
65669      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
65670      *) { eval $ac_var=; unset $ac_var;} ;;
65671      esac ;;
65672    esac
65673  done
65674
65675  (set) 2>&1 |
65676    case $as_nl`(ac_space=' '; set) 2>&1` in #(
65677    *${as_nl}ac_space=\ *)
65678      # `set' does not quote correctly, so add quotes: double-quote
65679      # substitution turns \\\\ into \\, and sed turns \\ into \.
65680      sed -n \
65681	"s/'/'\\\\''/g;
65682	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
65683      ;; #(
65684    *)
65685      # `set' quotes correctly as required by POSIX, so do not add quotes.
65686      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
65687      ;;
65688    esac |
65689    sort
65690) |
65691  sed '
65692     /^ac_cv_env_/b end
65693     t clear
65694     :clear
65695     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
65696     t end
65697     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
65698     :end' >>confcache
65699if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
65700  if test -w "$cache_file"; then
65701    if test "x$cache_file" != "x/dev/null"; then
65702      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
65703$as_echo "$as_me: updating cache $cache_file" >&6;}
65704      if test ! -f "$cache_file" || test -h "$cache_file"; then
65705	cat confcache >"$cache_file"
65706      else
65707        case $cache_file in #(
65708        */* | ?:*)
65709	  mv -f confcache "$cache_file"$$ &&
65710	  mv -f "$cache_file"$$ "$cache_file" ;; #(
65711        *)
65712	  mv -f confcache "$cache_file" ;;
65713	esac
65714      fi
65715    fi
65716  else
65717    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
65718$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
65719  fi
65720fi
65721rm -f confcache
65722
65723test "x$prefix" = xNONE && prefix=$ac_default_prefix
65724# Let make expand exec_prefix.
65725test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
65726
65727# Transform confdefs.h into DEFS.
65728# Protect against shell expansion while executing Makefile rules.
65729# Protect against Makefile macro expansion.
65730#
65731# If the first sed substitution is executed (which looks for macros that
65732# take arguments), then branch to the quote section.  Otherwise,
65733# look for a macro that doesn't take arguments.
65734ac_script='
65735:mline
65736/\\$/{
65737 N
65738 s,\\\n,,
65739 b mline
65740}
65741t clear
65742:clear
65743s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
65744t quote
65745s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
65746t quote
65747b any
65748:quote
65749s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
65750s/\[/\\&/g
65751s/\]/\\&/g
65752s/\$/$$/g
65753H
65754:any
65755${
65756	g
65757	s/^\n//
65758	s/\n/ /g
65759	p
65760}
65761'
65762DEFS=`sed -n "$ac_script" confdefs.h`
65763
65764
65765ac_libobjs=
65766ac_ltlibobjs=
65767U=
65768for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
65769  # 1. Remove the extension, and $U if already installed.
65770  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
65771  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
65772  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
65773  #    will be set to the directory where LIBOBJS objects are built.
65774  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
65775  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
65776done
65777LIBOBJS=$ac_libobjs
65778
65779LTLIBOBJS=$ac_ltlibobjs
65780
65781
65782
65783: "${CONFIG_STATUS=./config.status}"
65784ac_write_fail=0
65785ac_clean_files_save=$ac_clean_files
65786ac_clean_files="$ac_clean_files $CONFIG_STATUS"
65787{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
65788$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
65789as_write_fail=0
65790cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
65791#! $SHELL
65792# Generated by $as_me.
65793# Run this file to recreate the current configuration.
65794# Compiler output produced by configure, useful for debugging
65795# configure, is in config.log if it exists.
65796
65797debug=false
65798ac_cs_recheck=false
65799ac_cs_silent=false
65800
65801SHELL=\${CONFIG_SHELL-$SHELL}
65802export SHELL
65803_ASEOF
65804cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
65805## -------------------- ##
65806## M4sh Initialization. ##
65807## -------------------- ##
65808
65809# Be more Bourne compatible
65810DUALCASE=1; export DUALCASE # for MKS sh
65811if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
65812  emulate sh
65813  NULLCMD=:
65814  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
65815  # is contrary to our usage.  Disable this feature.
65816  alias -g '${1+"$@"}'='"$@"'
65817  setopt NO_GLOB_SUBST
65818else
65819  case `(set -o) 2>/dev/null` in #(
65820  *posix*) :
65821    set -o posix ;; #(
65822  *) :
65823     ;;
65824esac
65825fi
65826
65827
65828as_nl='
65829'
65830export as_nl
65831# Printing a long string crashes Solaris 7 /usr/bin/printf.
65832as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
65833as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
65834as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
65835# Prefer a ksh shell builtin over an external printf program on Solaris,
65836# but without wasting forks for bash or zsh.
65837if test -z "$BASH_VERSION$ZSH_VERSION" \
65838    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
65839  as_echo='print -r --'
65840  as_echo_n='print -rn --'
65841elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
65842  as_echo='printf %s\n'
65843  as_echo_n='printf %s'
65844else
65845  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
65846    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
65847    as_echo_n='/usr/ucb/echo -n'
65848  else
65849    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
65850    as_echo_n_body='eval
65851      arg=$1;
65852      case $arg in #(
65853      *"$as_nl"*)
65854	expr "X$arg" : "X\\(.*\\)$as_nl";
65855	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65856      esac;
65857      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
65858    '
65859    export as_echo_n_body
65860    as_echo_n='sh -c $as_echo_n_body as_echo'
65861  fi
65862  export as_echo_body
65863  as_echo='sh -c $as_echo_body as_echo'
65864fi
65865
65866# The user is always right.
65867if test "${PATH_SEPARATOR+set}" != set; then
65868  PATH_SEPARATOR=:
65869  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
65870    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
65871      PATH_SEPARATOR=';'
65872  }
65873fi
65874
65875
65876# IFS
65877# We need space, tab and new line, in precisely that order.  Quoting is
65878# there to prevent editors from complaining about space-tab.
65879# (If _AS_PATH_WALK were called with IFS unset, it would disable word
65880# splitting by setting IFS to empty value.)
65881IFS=" ""	$as_nl"
65882
65883# Find who we are.  Look in the path if we contain no directory separator.
65884as_myself=
65885case $0 in #((
65886  *[\\/]* ) as_myself=$0 ;;
65887  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65888for as_dir in $PATH
65889do
65890  IFS=$as_save_IFS
65891  test -z "$as_dir" && as_dir=.
65892    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
65893  done
65894IFS=$as_save_IFS
65895
65896     ;;
65897esac
65898# We did not find ourselves, most probably we were run as `sh COMMAND'
65899# in which case we are not to be found in the path.
65900if test "x$as_myself" = x; then
65901  as_myself=$0
65902fi
65903if test ! -f "$as_myself"; then
65904  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
65905  exit 1
65906fi
65907
65908# Unset variables that we do not need and which cause bugs (e.g. in
65909# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
65910# suppresses any "Segmentation fault" message there.  '((' could
65911# trigger a bug in pdksh 5.2.14.
65912for as_var in BASH_ENV ENV MAIL MAILPATH
65913do eval test x\${$as_var+set} = xset \
65914  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
65915done
65916PS1='$ '
65917PS2='> '
65918PS4='+ '
65919
65920# NLS nuisances.
65921LC_ALL=C
65922export LC_ALL
65923LANGUAGE=C
65924export LANGUAGE
65925
65926# CDPATH.
65927(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
65928
65929
65930# as_fn_error STATUS ERROR [LINENO LOG_FD]
65931# ----------------------------------------
65932# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
65933# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
65934# script with STATUS, using 1 if that was 0.
65935as_fn_error ()
65936{
65937  as_status=$1; test $as_status -eq 0 && as_status=1
65938  if test "$4"; then
65939    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
65940    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
65941  fi
65942  $as_echo "$as_me: error: $2" >&2
65943  as_fn_exit $as_status
65944} # as_fn_error
65945
65946
65947# as_fn_set_status STATUS
65948# -----------------------
65949# Set $? to STATUS, without forking.
65950as_fn_set_status ()
65951{
65952  return $1
65953} # as_fn_set_status
65954
65955# as_fn_exit STATUS
65956# -----------------
65957# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
65958as_fn_exit ()
65959{
65960  set +e
65961  as_fn_set_status $1
65962  exit $1
65963} # as_fn_exit
65964
65965# as_fn_unset VAR
65966# ---------------
65967# Portably unset VAR.
65968as_fn_unset ()
65969{
65970  { eval $1=; unset $1;}
65971}
65972as_unset=as_fn_unset
65973# as_fn_append VAR VALUE
65974# ----------------------
65975# Append the text in VALUE to the end of the definition contained in VAR. Take
65976# advantage of any shell optimizations that allow amortized linear growth over
65977# repeated appends, instead of the typical quadratic growth present in naive
65978# implementations.
65979if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
65980  eval 'as_fn_append ()
65981  {
65982    eval $1+=\$2
65983  }'
65984else
65985  as_fn_append ()
65986  {
65987    eval $1=\$$1\$2
65988  }
65989fi # as_fn_append
65990
65991# as_fn_arith ARG...
65992# ------------------
65993# Perform arithmetic evaluation on the ARGs, and store the result in the
65994# global $as_val. Take advantage of shells that can avoid forks. The arguments
65995# must be portable across $(()) and expr.
65996if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
65997  eval 'as_fn_arith ()
65998  {
65999    as_val=$(( $* ))
66000  }'
66001else
66002  as_fn_arith ()
66003  {
66004    as_val=`expr "$@" || test $? -eq 1`
66005  }
66006fi # as_fn_arith
66007
66008
66009if expr a : '\(a\)' >/dev/null 2>&1 &&
66010   test "X`expr 00001 : '.*\(...\)'`" = X001; then
66011  as_expr=expr
66012else
66013  as_expr=false
66014fi
66015
66016if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66017  as_basename=basename
66018else
66019  as_basename=false
66020fi
66021
66022if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66023  as_dirname=dirname
66024else
66025  as_dirname=false
66026fi
66027
66028as_me=`$as_basename -- "$0" ||
66029$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66030	 X"$0" : 'X\(//\)$' \| \
66031	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66032$as_echo X/"$0" |
66033    sed '/^.*\/\([^/][^/]*\)\/*$/{
66034	    s//\1/
66035	    q
66036	  }
66037	  /^X\/\(\/\/\)$/{
66038	    s//\1/
66039	    q
66040	  }
66041	  /^X\/\(\/\).*/{
66042	    s//\1/
66043	    q
66044	  }
66045	  s/.*/./; q'`
66046
66047# Avoid depending upon Character Ranges.
66048as_cr_letters='abcdefghijklmnopqrstuvwxyz'
66049as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
66050as_cr_Letters=$as_cr_letters$as_cr_LETTERS
66051as_cr_digits='0123456789'
66052as_cr_alnum=$as_cr_Letters$as_cr_digits
66053
66054ECHO_C= ECHO_N= ECHO_T=
66055case `echo -n x` in #(((((
66056-n*)
66057  case `echo 'xy\c'` in
66058  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
66059  xy)  ECHO_C='\c';;
66060  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
66061       ECHO_T='	';;
66062  esac;;
66063*)
66064  ECHO_N='-n';;
66065esac
66066
66067rm -f conf$$ conf$$.exe conf$$.file
66068if test -d conf$$.dir; then
66069  rm -f conf$$.dir/conf$$.file
66070else
66071  rm -f conf$$.dir
66072  mkdir conf$$.dir 2>/dev/null
66073fi
66074if (echo >conf$$.file) 2>/dev/null; then
66075  if ln -s conf$$.file conf$$ 2>/dev/null; then
66076    as_ln_s='ln -s'
66077    # ... but there are two gotchas:
66078    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66079    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66080    # In both cases, we have to default to `cp -pR'.
66081    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66082      as_ln_s='cp -pR'
66083  elif ln conf$$.file conf$$ 2>/dev/null; then
66084    as_ln_s=ln
66085  else
66086    as_ln_s='cp -pR'
66087  fi
66088else
66089  as_ln_s='cp -pR'
66090fi
66091rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66092rmdir conf$$.dir 2>/dev/null
66093
66094
66095# as_fn_mkdir_p
66096# -------------
66097# Create "$as_dir" as a directory, including parents if necessary.
66098as_fn_mkdir_p ()
66099{
66100
66101  case $as_dir in #(
66102  -*) as_dir=./$as_dir;;
66103  esac
66104  test -d "$as_dir" || eval $as_mkdir_p || {
66105    as_dirs=
66106    while :; do
66107      case $as_dir in #(
66108      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66109      *) as_qdir=$as_dir;;
66110      esac
66111      as_dirs="'$as_qdir' $as_dirs"
66112      as_dir=`$as_dirname -- "$as_dir" ||
66113$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66114	 X"$as_dir" : 'X\(//\)[^/]' \| \
66115	 X"$as_dir" : 'X\(//\)$' \| \
66116	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66117$as_echo X"$as_dir" |
66118    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66119	    s//\1/
66120	    q
66121	  }
66122	  /^X\(\/\/\)[^/].*/{
66123	    s//\1/
66124	    q
66125	  }
66126	  /^X\(\/\/\)$/{
66127	    s//\1/
66128	    q
66129	  }
66130	  /^X\(\/\).*/{
66131	    s//\1/
66132	    q
66133	  }
66134	  s/.*/./; q'`
66135      test -d "$as_dir" && break
66136    done
66137    test -z "$as_dirs" || eval "mkdir $as_dirs"
66138  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66139
66140
66141} # as_fn_mkdir_p
66142if mkdir -p . 2>/dev/null; then
66143  as_mkdir_p='mkdir -p "$as_dir"'
66144else
66145  test -d ./-p && rmdir ./-p
66146  as_mkdir_p=false
66147fi
66148
66149
66150# as_fn_executable_p FILE
66151# -----------------------
66152# Test if FILE is an executable regular file.
66153as_fn_executable_p ()
66154{
66155  test -f "$1" && test -x "$1"
66156} # as_fn_executable_p
66157as_test_x='test -x'
66158as_executable_p=as_fn_executable_p
66159
66160# Sed expression to map a string onto a valid CPP name.
66161as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66162
66163# Sed expression to map a string onto a valid variable name.
66164as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66165
66166
66167exec 6>&1
66168## ----------------------------------- ##
66169## Main body of $CONFIG_STATUS script. ##
66170## ----------------------------------- ##
66171_ASEOF
66172test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
66173
66174cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66175# Save the log message, to keep $0 and so on meaningful, and to
66176# report actual input values of CONFIG_FILES etc. instead of their
66177# values after options handling.
66178ac_log="
66179This file was extended by OpenJDK $as_me jdk9, which was
66180generated by GNU Autoconf 2.69.  Invocation command line was
66181
66182  CONFIG_FILES    = $CONFIG_FILES
66183  CONFIG_HEADERS  = $CONFIG_HEADERS
66184  CONFIG_LINKS    = $CONFIG_LINKS
66185  CONFIG_COMMANDS = $CONFIG_COMMANDS
66186  $ $0 $@
66187
66188on `(hostname || uname -n) 2>/dev/null | sed 1q`
66189"
66190
66191_ACEOF
66192
66193case $ac_config_files in *"
66194"*) set x $ac_config_files; shift; ac_config_files=$*;;
66195esac
66196
66197
66198
66199cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66200# Files that config.status was made for.
66201config_files="$ac_config_files"
66202
66203_ACEOF
66204
66205cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66206ac_cs_usage="\
66207\`$as_me' instantiates files and other configuration actions
66208from templates according to the current configuration.  Unless the files
66209and actions are specified as TAGs, all are instantiated by default.
66210
66211Usage: $0 [OPTION]... [TAG]...
66212
66213  -h, --help       print this help, then exit
66214  -V, --version    print version number and configuration settings, then exit
66215      --config     print configuration, then exit
66216  -q, --quiet, --silent
66217                   do not print progress messages
66218  -d, --debug      don't remove temporary files
66219      --recheck    update $as_me by reconfiguring in the same conditions
66220      --file=FILE[:TEMPLATE]
66221                   instantiate the configuration file FILE
66222
66223Configuration files:
66224$config_files
66225
66226Report bugs to <build-dev@openjdk.java.net>.
66227OpenJDK home page: <http://openjdk.java.net>."
66228
66229_ACEOF
66230cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66231ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66232ac_cs_version="\\
66233OpenJDK config.status jdk9
66234configured by $0, generated by GNU Autoconf 2.69,
66235  with options \\"\$ac_cs_config\\"
66236
66237Copyright (C) 2012 Free Software Foundation, Inc.
66238This config.status script is free software; the Free Software Foundation
66239gives unlimited permission to copy, distribute and modify it."
66240
66241ac_pwd='$ac_pwd'
66242srcdir='$srcdir'
66243AWK='$AWK'
66244test -n "\$AWK" || AWK=awk
66245_ACEOF
66246
66247cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66248# The default lists apply if the user does not specify any file.
66249ac_need_defaults=:
66250while test $# != 0
66251do
66252  case $1 in
66253  --*=?*)
66254    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66255    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
66256    ac_shift=:
66257    ;;
66258  --*=)
66259    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66260    ac_optarg=
66261    ac_shift=:
66262    ;;
66263  *)
66264    ac_option=$1
66265    ac_optarg=$2
66266    ac_shift=shift
66267    ;;
66268  esac
66269
66270  case $ac_option in
66271  # Handling of the options.
66272  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
66273    ac_cs_recheck=: ;;
66274  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
66275    $as_echo "$ac_cs_version"; exit ;;
66276  --config | --confi | --conf | --con | --co | --c )
66277    $as_echo "$ac_cs_config"; exit ;;
66278  --debug | --debu | --deb | --de | --d | -d )
66279    debug=: ;;
66280  --file | --fil | --fi | --f )
66281    $ac_shift
66282    case $ac_optarg in
66283    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
66284    '') as_fn_error $? "missing file argument" ;;
66285    esac
66286    as_fn_append CONFIG_FILES " '$ac_optarg'"
66287    ac_need_defaults=false;;
66288  --he | --h |  --help | --hel | -h )
66289    $as_echo "$ac_cs_usage"; exit ;;
66290  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
66291  | -silent | --silent | --silen | --sile | --sil | --si | --s)
66292    ac_cs_silent=: ;;
66293
66294  # This is an error.
66295  -*) as_fn_error $? "unrecognized option: \`$1'
66296Try \`$0 --help' for more information." ;;
66297
66298  *) as_fn_append ac_config_targets " $1"
66299     ac_need_defaults=false ;;
66300
66301  esac
66302  shift
66303done
66304
66305ac_configure_extra_args=
66306
66307if $ac_cs_silent; then
66308  exec 6>/dev/null
66309  ac_configure_extra_args="$ac_configure_extra_args --silent"
66310fi
66311
66312_ACEOF
66313cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66314if \$ac_cs_recheck; then
66315  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
66316  shift
66317  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
66318  CONFIG_SHELL='$SHELL'
66319  export CONFIG_SHELL
66320  exec "\$@"
66321fi
66322
66323_ACEOF
66324cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66325exec 5>>config.log
66326{
66327  echo
66328  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
66329## Running $as_me. ##
66330_ASBOX
66331  $as_echo "$ac_log"
66332} >&5
66333
66334_ACEOF
66335cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66336_ACEOF
66337
66338cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66339
66340# Handling of arguments.
66341for ac_config_target in $ac_config_targets
66342do
66343  case $ac_config_target in
66344    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
66345    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
66346    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
66347    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
66348    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
66349
66350  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
66351  esac
66352done
66353
66354
66355# If the user did not use the arguments to specify the items to instantiate,
66356# then the envvar interface is used.  Set only those that are not.
66357# We use the long form for the default assignment because of an extremely
66358# bizarre bug on SunOS 4.1.3.
66359if $ac_need_defaults; then
66360  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
66361fi
66362
66363# Have a temporary directory for convenience.  Make it in the build tree
66364# simply because there is no reason against having it here, and in addition,
66365# creating and moving files from /tmp can sometimes cause problems.
66366# Hook for its removal unless debugging.
66367# Note that there is a small window in which the directory will not be cleaned:
66368# after its creation but before its name has been assigned to `$tmp'.
66369$debug ||
66370{
66371  tmp= ac_tmp=
66372  trap 'exit_status=$?
66373  : "${ac_tmp:=$tmp}"
66374  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
66375' 0
66376  trap 'as_fn_exit 1' 1 2 13 15
66377}
66378# Create a (secure) tmp directory for tmp files.
66379
66380{
66381  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
66382  test -d "$tmp"
66383}  ||
66384{
66385  tmp=./conf$$-$RANDOM
66386  (umask 077 && mkdir "$tmp")
66387} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
66388ac_tmp=$tmp
66389
66390# Set up the scripts for CONFIG_FILES section.
66391# No need to generate them if there are no CONFIG_FILES.
66392# This happens for instance with `./config.status config.h'.
66393if test -n "$CONFIG_FILES"; then
66394
66395
66396ac_cr=`echo X | tr X '\015'`
66397# On cygwin, bash can eat \r inside `` if the user requested igncr.
66398# But we know of no other shell where ac_cr would be empty at this
66399# point, so we can use a bashism as a fallback.
66400if test "x$ac_cr" = x; then
66401  eval ac_cr=\$\'\\r\'
66402fi
66403ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
66404if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
66405  ac_cs_awk_cr='\\r'
66406else
66407  ac_cs_awk_cr=$ac_cr
66408fi
66409
66410echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
66411_ACEOF
66412
66413
66414{
66415  echo "cat >conf$$subs.awk <<_ACEOF" &&
66416  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
66417  echo "_ACEOF"
66418} >conf$$subs.sh ||
66419  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66420ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
66421ac_delim='%!_!# '
66422for ac_last_try in false false false false false :; do
66423  . ./conf$$subs.sh ||
66424    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66425
66426  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
66427  if test $ac_delim_n = $ac_delim_num; then
66428    break
66429  elif $ac_last_try; then
66430    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66431  else
66432    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
66433  fi
66434done
66435rm -f conf$$subs.sh
66436
66437cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66438cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
66439_ACEOF
66440sed -n '
66441h
66442s/^/S["/; s/!.*/"]=/
66443p
66444g
66445s/^[^!]*!//
66446:repl
66447t repl
66448s/'"$ac_delim"'$//
66449t delim
66450:nl
66451h
66452s/\(.\{148\}\)..*/\1/
66453t more1
66454s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
66455p
66456n
66457b repl
66458:more1
66459s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66460p
66461g
66462s/.\{148\}//
66463t nl
66464:delim
66465h
66466s/\(.\{148\}\)..*/\1/
66467t more2
66468s/["\\]/\\&/g; s/^/"/; s/$/"/
66469p
66470b
66471:more2
66472s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66473p
66474g
66475s/.\{148\}//
66476t delim
66477' <conf$$subs.awk | sed '
66478/^[^""]/{
66479  N
66480  s/\n//
66481}
66482' >>$CONFIG_STATUS || ac_write_fail=1
66483rm -f conf$$subs.awk
66484cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66485_ACAWK
66486cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
66487  for (key in S) S_is_set[key] = 1
66488  FS = ""
66489
66490}
66491{
66492  line = $ 0
66493  nfields = split(line, field, "@")
66494  substed = 0
66495  len = length(field[1])
66496  for (i = 2; i < nfields; i++) {
66497    key = field[i]
66498    keylen = length(key)
66499    if (S_is_set[key]) {
66500      value = S[key]
66501      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
66502      len += length(value) + length(field[++i])
66503      substed = 1
66504    } else
66505      len += 1 + keylen
66506  }
66507
66508  print line
66509}
66510
66511_ACAWK
66512_ACEOF
66513cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66514if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
66515  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
66516else
66517  cat
66518fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
66519  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
66520_ACEOF
66521
66522# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
66523# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
66524# trailing colons and then remove the whole line if VPATH becomes empty
66525# (actually we leave an empty line to preserve line numbers).
66526if test "x$srcdir" = x.; then
66527  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
66528h
66529s///
66530s/^/:/
66531s/[	 ]*$/:/
66532s/:\$(srcdir):/:/g
66533s/:\${srcdir}:/:/g
66534s/:@srcdir@:/:/g
66535s/^:*//
66536s/:*$//
66537x
66538s/\(=[	 ]*\).*/\1/
66539G
66540s/\n//
66541s/^[^=]*=[	 ]*$//
66542}'
66543fi
66544
66545cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66546fi # test -n "$CONFIG_FILES"
66547
66548
66549eval set X "  :F $CONFIG_FILES      "
66550shift
66551for ac_tag
66552do
66553  case $ac_tag in
66554  :[FHLC]) ac_mode=$ac_tag; continue;;
66555  esac
66556  case $ac_mode$ac_tag in
66557  :[FHL]*:*);;
66558  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
66559  :[FH]-) ac_tag=-:-;;
66560  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
66561  esac
66562  ac_save_IFS=$IFS
66563  IFS=:
66564  set x $ac_tag
66565  IFS=$ac_save_IFS
66566  shift
66567  ac_file=$1
66568  shift
66569
66570  case $ac_mode in
66571  :L) ac_source=$1;;
66572  :[FH])
66573    ac_file_inputs=
66574    for ac_f
66575    do
66576      case $ac_f in
66577      -) ac_f="$ac_tmp/stdin";;
66578      *) # Look for the file first in the build tree, then in the source tree
66579	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
66580	 # because $ac_f cannot contain `:'.
66581	 test -f "$ac_f" ||
66582	   case $ac_f in
66583	   [\\/$]*) false;;
66584	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
66585	   esac ||
66586	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
66587      esac
66588      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
66589      as_fn_append ac_file_inputs " '$ac_f'"
66590    done
66591
66592    # Let's still pretend it is `configure' which instantiates (i.e., don't
66593    # use $as_me), people would be surprised to read:
66594    #    /* config.h.  Generated by config.status.  */
66595    configure_input='Generated from '`
66596	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
66597	`' by configure.'
66598    if test x"$ac_file" != x-; then
66599      configure_input="$ac_file.  $configure_input"
66600      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
66601$as_echo "$as_me: creating $ac_file" >&6;}
66602    fi
66603    # Neutralize special characters interpreted by sed in replacement strings.
66604    case $configure_input in #(
66605    *\&* | *\|* | *\\* )
66606       ac_sed_conf_input=`$as_echo "$configure_input" |
66607       sed 's/[\\\\&|]/\\\\&/g'`;; #(
66608    *) ac_sed_conf_input=$configure_input;;
66609    esac
66610
66611    case $ac_tag in
66612    *:-:* | *:-) cat >"$ac_tmp/stdin" \
66613      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
66614    esac
66615    ;;
66616  esac
66617
66618  ac_dir=`$as_dirname -- "$ac_file" ||
66619$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66620	 X"$ac_file" : 'X\(//\)[^/]' \| \
66621	 X"$ac_file" : 'X\(//\)$' \| \
66622	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
66623$as_echo X"$ac_file" |
66624    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66625	    s//\1/
66626	    q
66627	  }
66628	  /^X\(\/\/\)[^/].*/{
66629	    s//\1/
66630	    q
66631	  }
66632	  /^X\(\/\/\)$/{
66633	    s//\1/
66634	    q
66635	  }
66636	  /^X\(\/\).*/{
66637	    s//\1/
66638	    q
66639	  }
66640	  s/.*/./; q'`
66641  as_dir="$ac_dir"; as_fn_mkdir_p
66642  ac_builddir=.
66643
66644case "$ac_dir" in
66645.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
66646*)
66647  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
66648  # A ".." for each directory in $ac_dir_suffix.
66649  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
66650  case $ac_top_builddir_sub in
66651  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
66652  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
66653  esac ;;
66654esac
66655ac_abs_top_builddir=$ac_pwd
66656ac_abs_builddir=$ac_pwd$ac_dir_suffix
66657# for backward compatibility:
66658ac_top_builddir=$ac_top_build_prefix
66659
66660case $srcdir in
66661  .)  # We are building in place.
66662    ac_srcdir=.
66663    ac_top_srcdir=$ac_top_builddir_sub
66664    ac_abs_top_srcdir=$ac_pwd ;;
66665  [\\/]* | ?:[\\/]* )  # Absolute name.
66666    ac_srcdir=$srcdir$ac_dir_suffix;
66667    ac_top_srcdir=$srcdir
66668    ac_abs_top_srcdir=$srcdir ;;
66669  *) # Relative name.
66670    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
66671    ac_top_srcdir=$ac_top_build_prefix$srcdir
66672    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
66673esac
66674ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
66675
66676
66677  case $ac_mode in
66678  :F)
66679  #
66680  # CONFIG_FILE
66681  #
66682
66683_ACEOF
66684
66685cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66686# If the template does not know about datarootdir, expand it.
66687# FIXME: This hack should be removed a few years after 2.60.
66688ac_datarootdir_hack=; ac_datarootdir_seen=
66689ac_sed_dataroot='
66690/datarootdir/ {
66691  p
66692  q
66693}
66694/@datadir@/p
66695/@docdir@/p
66696/@infodir@/p
66697/@localedir@/p
66698/@mandir@/p'
66699case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
66700*datarootdir*) ac_datarootdir_seen=yes;;
66701*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
66702  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
66703$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
66704_ACEOF
66705cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66706  ac_datarootdir_hack='
66707  s&@datadir@&$datadir&g
66708  s&@docdir@&$docdir&g
66709  s&@infodir@&$infodir&g
66710  s&@localedir@&$localedir&g
66711  s&@mandir@&$mandir&g
66712  s&\\\${datarootdir}&$datarootdir&g' ;;
66713esac
66714_ACEOF
66715
66716# Neutralize VPATH when `$srcdir' = `.'.
66717# Shell code in configure.ac might set extrasub.
66718# FIXME: do we really want to maintain this feature?
66719cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66720ac_sed_extra="$ac_vpsub
66721$extrasub
66722_ACEOF
66723cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66724:t
66725/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
66726s|@configure_input@|$ac_sed_conf_input|;t t
66727s&@top_builddir@&$ac_top_builddir_sub&;t t
66728s&@top_build_prefix@&$ac_top_build_prefix&;t t
66729s&@srcdir@&$ac_srcdir&;t t
66730s&@abs_srcdir@&$ac_abs_srcdir&;t t
66731s&@top_srcdir@&$ac_top_srcdir&;t t
66732s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
66733s&@builddir@&$ac_builddir&;t t
66734s&@abs_builddir@&$ac_abs_builddir&;t t
66735s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
66736$ac_datarootdir_hack
66737"
66738eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
66739  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66740
66741test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
66742  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
66743  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
66744      "$ac_tmp/out"`; test -z "$ac_out"; } &&
66745  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66746which seems to be undefined.  Please make sure it is defined" >&5
66747$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66748which seems to be undefined.  Please make sure it is defined" >&2;}
66749
66750  rm -f "$ac_tmp/stdin"
66751  case $ac_file in
66752  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
66753  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
66754  esac \
66755  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66756 ;;
66757
66758
66759
66760  esac
66761
66762done # for ac_tag
66763
66764
66765as_fn_exit 0
66766_ACEOF
66767ac_clean_files=$ac_clean_files_save
66768
66769test $ac_write_fail = 0 ||
66770  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
66771
66772
66773# configure is writing to config.log, and then calls config.status.
66774# config.status does its own redirection, appending to config.log.
66775# Unfortunately, on DOS this fails, as config.log is still kept open
66776# by configure, so config.status won't be able to write to it; its
66777# output is simply discarded.  So we exec the FD to /dev/null,
66778# effectively closing config.log, so it can be properly (re)opened and
66779# appended to by config.status.  When coming back to configure, we
66780# need to make the FD available again.
66781if test "$no_create" != yes; then
66782  ac_cs_success=:
66783  ac_config_status_args=
66784  test "$silent" = yes &&
66785    ac_config_status_args="$ac_config_status_args --quiet"
66786  exec 5>/dev/null
66787  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
66788  exec 5>>config.log
66789  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
66790  # would make configure fail if this is the last instruction.
66791  $ac_cs_success || as_fn_exit 1
66792fi
66793if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
66794  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
66795$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
66796fi
66797
66798
66799# After AC_OUTPUT, we need to do final work
66800
66801
66802  # Try to move config.log (generated by autoconf) to the configure-support directory.
66803  if test -e ./config.log; then
66804    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
66805  fi
66806
66807  # Rotate our log file (configure.log)
66808  if test -e "$OUTPUT_ROOT/configure.log.old"; then
66809    $RM -f "$OUTPUT_ROOT/configure.log.old"
66810  fi
66811  if test -e "$OUTPUT_ROOT/configure.log"; then
66812    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
66813  fi
66814
66815  # Move configure.log from current directory to the build output root
66816  if test -e ./configure.log; then
66817    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
66818  fi
66819
66820  # Make the compare script executable
66821  $CHMOD +x $OUTPUT_ROOT/compare.sh
66822
66823
66824# Finally output some useful information to the user
66825
66826  # Finally output some useful information to the user
66827
66828  printf "\n"
66829  printf "====================================================\n"
66830  if test "x$no_create" != "xyes"; then
66831    if test "x$IS_RECONFIGURE" != "xyes"; then
66832      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
66833    else
66834      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
66835    fi
66836  else
66837    if test "x$IS_RECONFIGURE" != "xyes"; then
66838      printf "A configuration has been successfully checked but not created\n"
66839    else
66840      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
66841    fi
66842  fi
66843  if test "x$CONFIGURE_COMMAND_LINE" != x; then
66844    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
66845  else
66846    printf "using default settings.\n"
66847  fi
66848
66849  printf "\n"
66850  printf "Configuration summary:\n"
66851  printf "* Debug level:    $DEBUG_LEVEL\n"
66852  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
66853  printf "* JDK variant:    $JDK_VARIANT\n"
66854  printf "* JVM variants:   $JVM_VARIANTS\n"
66855  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
66856  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
66857
66858  printf "\n"
66859  printf "Tools summary:\n"
66860  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
66861    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
66862  fi
66863  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
66864  if test "x$TOOLCHAIN_VERSION" != "x"; then
66865    print_version=" $TOOLCHAIN_VERSION"
66866  fi
66867  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
66868  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
66869  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
66870
66871  printf "\n"
66872  printf "Build performance summary:\n"
66873  printf "* Cores to use:   $JOBS\n"
66874  printf "* Memory limit:   $MEMORY_SIZE MB\n"
66875  if test "x$CCACHE_STATUS" != "x"; then
66876    printf "* ccache status:  $CCACHE_STATUS\n"
66877  fi
66878  printf "\n"
66879
66880  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
66881    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
66882    printf "will result in longer build times.\n"
66883    printf "\n"
66884  fi
66885
66886  if test "x$FOUND_ALT_VARIABLES" != "x"; then
66887    printf "WARNING: You have old-style ALT_ environment variables set.\n"
66888    printf "These are not respected, and will be ignored. It is recommended\n"
66889    printf "that you clean your environment. The following variables are set:\n"
66890    printf "$FOUND_ALT_VARIABLES\n"
66891    printf "\n"
66892  fi
66893
66894  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
66895    printf "WARNING: Your build output directory is not on a local disk.\n"
66896    printf "This will severely degrade build performance!\n"
66897    printf "It is recommended that you create an output directory on a local disk,\n"
66898    printf "and run the configure script again from that directory.\n"
66899    printf "\n"
66900  fi
66901
66902  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
66903    printf "WARNING: The result of this configuration has overridden an older\n"
66904    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
66905    printf "proper build. Failure to do so might result in strange build problems.\n"
66906    printf "\n"
66907  fi
66908
66909  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
66910    printf "WARNING: The result of this configuration was not saved.\n"
66911    printf "You should run without '--no-create | -n' to create the configuration.\n"
66912    printf "\n"
66913  fi
66914
66915
66916
66917  # Locate config.log.
66918  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
66919    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
66920  elif test -e "./config.log"; then
66921    CONFIG_LOG_PATH="."
66922  fi
66923
66924  if test -e "$CONFIG_LOG_PATH/config.log"; then
66925    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
66926    if test $? -eq 0; then
66927      printf "The following warnings were produced. Repeated here for convenience:\n"
66928      # We must quote sed expression (using []) to stop m4 from eating the [].
66929      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
66930      printf "\n"
66931    fi
66932  fi
66933
66934